From 6ae193981fcc05dcc495b4bde92cb8fd290ee4dd Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 21 Jul 2004 08:57:57 +0000 Subject: [PATCH] initial checkin of new hdw-linux development cvs repository --- Config | 68 + doc/BUILD | 128 + doc/CHANGELOG | 1696 ++++++ doc/Developers | 13 + doc/INSTALL | 139 + doc/License | 340 ++ doc/README | 71 + doc/VERSION | 1 + misc/arch/ia32/busybox.config | 427 ++ misc/arch/ia32/linux.config | 1107 ++++ misc/arch/sparc64/linux.config | 982 ++++ misc/crossbuild/fake_utsname/Makefile | 12 + misc/crossbuild/fake_utsname/fake_utsname.c | 57 + misc/crossbuild/fake_utsname/fake_utsname.o | Bin 0 -> 1592 bytes misc/hdw-tools/btee.c | 94 + misc/hdw-tools/hdw-get | 118 + misc/internal/make_tar.sh | 48 + misc/sysfiles/etc/HOSTNAME | 1 + misc/sysfiles/etc/conf/bootdown | 19 + misc/sysfiles/etc/conf/kernel | 8 + misc/sysfiles/etc/conf/network | 51 + misc/sysfiles/etc/conf/profile | 22 + misc/sysfiles/etc/dircolors | 86 + misc/sysfiles/etc/fstab | 8 + misc/sysfiles/etc/group | 12 + misc/sysfiles/etc/host.conf | 6 + misc/sysfiles/etc/hosts | 14 + misc/sysfiles/etc/init.d/boot | 163 + misc/sysfiles/etc/init.d/cron | 26 + misc/sysfiles/etc/init.d/down | 86 + misc/sysfiles/etc/init.d/network | 24 + misc/sysfiles/etc/init.d/nscd | 31 + misc/sysfiles/etc/init.d/rc | 75 + misc/sysfiles/etc/init.d/sysklogd | 33 + misc/sysfiles/etc/initscript | 20 + misc/sysfiles/etc/inittab | 33 + misc/sysfiles/etc/issue | 6 + misc/sysfiles/etc/ld.so.conf | 6 + misc/sysfiles/etc/networks | 4 + misc/sysfiles/etc/nsswitch.conf | 20 + misc/sysfiles/etc/passwd | 5 + misc/sysfiles/etc/profile | 82 + misc/sysfiles/etc/resolv.conf | 9 + misc/sysfiles/etc/shadow | 5 + misc/sysfiles/etc/shells | 7 + misc/sysfiles/etc/syslog.conf | 25 + .../00-copy-system-files/00-copy-system-files | 64 + packages/base/00-dirtree/00-dirtree | 216 + .../00-final-base-conf/00-final-base-conf | 37 + packages/base/00-init-conf/00-init-conf | 106 + packages/base/00-init-conf/cron.init | 2 + packages/base/00-init-conf/ctraltdel.init | 4 + packages/base/00-init-conf/devfs.init | 3 + packages/base/00-init-conf/devfsd.init | 4 + packages/base/00-init-conf/fsck.init | 4 + packages/base/00-init-conf/hostname.init | 3 + packages/base/00-init-conf/ifconfig.init | 4 + packages/base/00-init-conf/ifconfiglo.init | 4 + packages/base/00-init-conf/kernel.init | 3 + packages/base/00-init-conf/klogd.init | 2 + packages/base/00-init-conf/mkshm.init | 2 + packages/base/00-init-conf/mountdev.init | 4 + packages/base/00-init-conf/mountfs.init | 4 + packages/base/00-init-conf/mountproc.init | 4 + packages/base/00-init-conf/mountro.init | 4 + packages/base/00-init-conf/mountrw.init | 4 + packages/base/00-init-conf/mountshm.init | 4 + packages/base/00-init-conf/mtab.init | 4 + packages/base/00-init-conf/route.init | 4 + packages/base/00-init-conf/routelo.init | 4 + packages/base/00-init-conf/swapon.init | 3 + packages/base/00-init-conf/syslogd.init | 2 + .../00-small-base-conf/00-small-base-conf | 37 + packages/base/autoconf/autoconf | 7 + packages/base/automake/automake | 14 + packages/base/bash/avoid_keypad_sigsev.patch | 33 + packages/base/bash/bash | 23 + packages/base/bash/no_space_append.patch | 58 + packages/base/bash/variable_expansion.patch | 41 + packages/base/bash/vi_repeat.patch | 27 + packages/base/bdb/bdb | 18 + packages/base/bdb/lock.patch | 45 + packages/base/bdb/mp.patch | 36 + packages/base/binutils/binutils | 50 + packages/base/bison/bison | 22 + packages/base/bzip2/bzip2 | 27 + packages/base/coreutils/coreutils | 27 + packages/base/coreutils/coreutils_dupes.patch | 292 + packages/base/coreutils/coreutils_uname.patch | 167 + packages/base/cvs/cvs | 7 + packages/base/diffutils/diffutils | 7 + packages/base/e2fsprogs/e2fsprogs | 17 + packages/base/ed/ed | 13 + packages/base/ed/ed_mkstemp.patch | 19 + packages/base/file/file | 7 + packages/base/findutils/findutils | 13 + packages/base/flex/debian_fixes.patch | 246 + packages/base/flex/flex | 17 + packages/base/gawk/gawk | 9 + packages/base/gcc/gcc | 40 + packages/base/gcc/no_fix_includes.patch | 21 + .../base/gcc/undef_gnu_src.patch.dietlibc | 13 + packages/base/gettext/gettext | 7 + packages/base/glibc/glibc | 36 + packages/base/grep/grep | 11 + packages/base/groff/groff | 13 + packages/base/gzip/gzip | 30 + packages/base/hotplug/hotplug | 7 + packages/base/kbd/kbd | 9 + packages/base/less/less | 9 + packages/base/libtool/libtool | 7 + .../linux-libc-headers/linux-libc-headers | 17 + packages/base/linux/linux | 56 + packages/base/m4/m4 | 7 + packages/base/make/make | 7 + packages/base/man-pages/man-pages | 11 + packages/base/man/man | 9 + packages/base/man/man_80cols.patch | 14 + packages/base/man/man_manpath.patch | 12 + packages/base/man/man_pager.patch | 12 + .../base/module-init-tools/module-init-tools | 16 + packages/base/ncurses/ncurses | 18 + packages/base/net-tools/gcc_34.patch | 67 + packages/base/net-tools/net-tools | 28 + packages/base/netkit-base/netkit-base | 32 + packages/base/netkit-base/netkit-base.init | 3 + packages/base/nvi/catman_sucks.patch | 11 + packages/base/nvi/errno.patch | 128 + packages/base/nvi/ncurses.patch | 31 + packages/base/nvi/no-machine-setting.patch | 11 + packages/base/nvi/nvi | 25 + packages/base/patch/patch | 12 + packages/base/perl/perl | 26 + packages/base/perl/perl_libc.patch.1 | 22 + packages/base/procps/procps | 11 + packages/base/psmisc/psmisc | 14 + packages/base/sed/permissions.patch.2 | 10 + packages/base/sed/sed | 9 + packages/base/shadow/shadow | 30 + packages/base/sysklogd/kernel_headers.patch | 87 + packages/base/sysklogd/signal.patch | 15 + packages/base/sysklogd/sysklogd | 10 + packages/base/sysvinit/sysvinit | 16 + packages/base/tar/tar | 7 + packages/base/termcap/termcap | 11 + packages/base/texinfo/texinfo | 14 + packages/base/udev/init_udev.sh | 104 + packages/base/udev/udev | 48 + packages/base/util-linux/kernel_headers.patch | 83 + packages/base/util-linux/util-linux | 36 + packages/base/wget/allow-tilde-in-url.patch | 11 + packages/base/wget/wget | 8 + packages/base/zlib/zlib | 22 + packages/devel/emacs/emacs | 7 + .../devel/emacs/xaw_arrow_scrollbar.patch | 10 + packages/devel/gdb/gdb | 7 + packages/devel/gdbm/gdbm | 9 + packages/devel/orbit/orbit | 9 + packages/devel/python/python | 9 + packages/devel/tcltk/tcltk | 34 + packages/diet/dietlibc/dietlibc | 11 + packages/diet/fgetty/fgetty | 8 + packages/diet/minit/minit | 13 + packages/hackbard/acroread/acroread | 21 + packages/hackbard/acroread/install.patch | 43 + packages/hackbard/apache/apache | 19 + packages/hackbard/apache/apache.init | 5 + packages/hackbard/avra/avra | 15 + packages/hackbard/avra/avra_manpage | 99 + packages/hackbard/bc/bc | 7 + packages/hackbard/cdrtools/cdrtools | 15 + packages/hackbard/cdrtools/u8.patch | 12 + packages/hackbard/cron/cron | 43 + packages/hackbard/cron/cron.init | 2 + packages/hackbard/cron/cron_3.0pl1-72.patch | 4098 ++++++++++++++ packages/hackbard/cups/cups | 10 + packages/hackbard/cups/cups.init | 3 + packages/hackbard/cups/manpages.patch | 11 + packages/hackbard/curl/curl | 7 + packages/hackbard/cvsd/cvsd | 15 + packages/hackbard/cvsd/cvsd.init | 1 + packages/hackbard/cvsd/cvsd.setup | 12 + packages/hackbard/dfbpoint/dfbpoint | 9 + packages/hackbard/dfbpoint/render_c.patch | 11 + packages/hackbard/dfbsee/dfbsee | 9 + packages/hackbard/directfb/directfb | 27 + packages/hackbard/elftoaout/elftoaout | 13 + packages/hackbard/fbset/fbset | 11 + packages/hackbard/fbset/makefile.patch | 18 + packages/hackbard/gpsd/gpsd | 13 + packages/hackbard/gpsd/include_stdarg_h.patch | 11 + .../hackbard/gtk-gnutella/configure.patch | 18 + packages/hackbard/gtk-gnutella/gtk-gnutella | 16 + packages/hackbard/hdparm/hdparm | 7 + packages/hackbard/hdparm/readahead.patch | 31 + packages/hackbard/hostap/hostap | 14 + packages/hackbard/ipcheck/ipcheck | 14 + packages/hackbard/irssi/irssi | 7 + packages/hackbard/isdn4k-utils/autoconf.patch | 135 + packages/hackbard/isdn4k-utils/isdn4k-utils | 23 + .../hackbard/isdn4k-utils/no_make_dev.patch | 11 + .../hackbard/isdn4k-utils/options_c.patch | 30 + packages/hackbard/libunicode/libunicode | 7 + packages/hackbard/licq/licq | 14 + packages/hackbard/licq/nptl.patch | 12 + packages/hackbard/lphdisk/lphdisk | 13 + packages/hackbard/lphdisk/usage.patch | 26 + packages/hackbard/lprng/lprng | 19 + packages/hackbard/lprng/lprng.init | 3 + packages/hackbard/ltrace/ltrace | 9 + packages/hackbard/lynx/lynx | 23 + packages/hackbard/magicfilter/magicfilter | 14 + .../hackbard/magicfilter/no_cfmagic.patch | 11 + packages/hackbard/mhonarc/makefile_pl.patch | 15 + packages/hackbard/mhonarc/mhonarc | 19 + packages/hackbard/minicom/minicom | 10 + packages/hackbard/minimalist/minimalist | 74 + packages/hackbard/mppp/mppp | 19 + packages/hackbard/openldap/openldap | 10 + packages/hackbard/parted/parted | 9 + packages/hackbard/pciutils/pciutils | 10 + packages/hackbard/pcmcia-cs/pcmcia-cs | 18 + .../pcmcia-cs/use_linux_srctree.patch | 10 + packages/hackbard/pine/pine | 19 + packages/hackbard/procmail/procmail | 16 + packages/hackbard/raptor/raptor | 7 + packages/hackbard/rcs/conf_sh.patch | 20 + packages/hackbard/rcs/rcs | 10 + packages/hackbard/root-tail/root-tail | 15 + packages/hackbard/rsync/rsync | 11 + packages/hackbard/screen/screen | 8 + packages/hackbard/scummvm/scummvm | 14 + packages/hackbard/sendmail/Makefile | 26 + packages/hackbard/sendmail/aliases | 8 + packages/hackbard/sendmail/local-host-names | 7 + packages/hackbard/sendmail/sendmail | 37 + packages/hackbard/sendmail/sendmail.init | 2 + packages/hackbard/sendmail/sendmail.setup | 10 + packages/hackbard/sendmail/site.config.m4 | 7 + packages/hackbard/sersniff/sersniff | 14 + .../sersniff/sersniff-fprintf-bug.patch | 30 + packages/hackbard/sp12/sp12 | 21 + packages/hackbard/strace/strace | 9 + packages/hackbard/tetex/tetex | 47 + packages/hackbard/tpconfig/tpconfig | 12 + packages/hackbard/unzip/unzip | 12 + packages/hackbard/vim/vim | 14 + packages/hackbard/wine/wine | 12 + packages/hackbard/xdirectfb/xdirectfb | 29 + packages/hackbard/zip/zip | 12 + packages/hpc/lam/lam | 10 + .../hpc/openmosixuserland/openmosixuserland | 19 + packages/ia32/bin86/bin86 | 10 + packages/ia32/bootdisk/bootdisk | 75 + packages/ia32/bootdisk/issue | 16 + packages/ia32/bootdisk/kernel_2_6_x.patch | 4820 ++++++++++++++++ packages/ia32/bootdisk/rules_make.patch | 11 + packages/ia32/lilo/kernel_2_6_x.patch | 4832 +++++++++++++++++ packages/ia32/lilo/lilo | 10 + packages/ia32/nasm/nasm | 7 + packages/ia32/syslinux/no_syslinux_exe.patch | 25 + packages/ia32/syslinux/syslinux | 13 + packages/multimedia/aalib/aalib | 7 + packages/multimedia/audiofile/audiofile | 7 + packages/multimedia/avifile/avifile | 13 + packages/multimedia/faad2/faad2 | 11 + .../multimedia/faad2/no_rpm_makefile.patch | 11 + packages/multimedia/ffmpeg/ffmpeg | 19 + packages/multimedia/flite/flite | 15 + packages/multimedia/lame/lame | 7 + packages/multimedia/liba52/liba52 | 13 + .../multimedia/libdivxdecore/libdivxdecore | 7 + packages/multimedia/libdvbpsi/libdvbpsi | 7 + packages/multimedia/libdvdcss/libdvdcss | 7 + packages/multimedia/libdvdplay/libdvdplay | 7 + packages/multimedia/libdvdread/libdvdread | 9 + packages/multimedia/libflash/libflash | 9 + packages/multimedia/libflash/shape.patch | 10 + packages/multimedia/libjpeg/libjpeg | 10 + packages/multimedia/libmad/libmad | 7 + packages/multimedia/libmpeg2/libmpeg2 | 13 + packages/multimedia/libmpeg3/libmpeg3 | 14 + packages/multimedia/libmpeg3/makefile.patch | 11 + packages/multimedia/libogg/libogg | 7 + packages/multimedia/libpdf/libpdf | 9 + packages/multimedia/libpng/libpng | 17 + .../multimedia/libpng/makefile.linux.patch | 19 + packages/multimedia/libtiff/libtiff | 10 + packages/multimedia/libtiff/manpages.patch | 10 + packages/multimedia/libungif/libungif | 11 + packages/multimedia/libvorbis/libvorbis | 9 + packages/multimedia/mplayer/kernel_2_6.patch | 12 + packages/multimedia/mplayer/mplayer | 43 + .../openmotif/no_animate_demo.patch | 10 + packages/multimedia/openmotif/openmotif | 9 + packages/multimedia/sdl/sdl | 11 + packages/multimedia/speex/speex | 7 + packages/multimedia/transcode/transcode | 7 + packages/multimedia/vlc/vlc | 8 + packages/multimedia/vobcopy/vobcopy | 18 + packages/multimedia/xawtv/xawtv | 11 + packages/multimedia/xvid/xvid | 19 + packages/net/bind/bind | 9 + packages/net/bind/named.init | 1 + packages/net/bridge-utils/bridge-utils | 7 + packages/net/dhcp/dhcp | 31 + packages/net/dhcp/dhcp.init | 4 + packages/net/ethereal/ethereal | 16 + packages/net/ettercap/ettercap | 7 + packages/net/ipsec-tools/ipsec-tools | 18 + packages/net/iptables/iptables | 10 + packages/net/iptables/libip6tc.patch | 11 + packages/net/iptables/libiptc.patch | 11 + packages/net/libnet/libnet | 11 + packages/net/libpcap/libpcap | 7 + packages/net/netkit-ftp/netkit-ftp | 9 + packages/net/netkit-rsh/netkit-rsh | 9 + packages/net/netkit-telnet/line-name.patch | 33 + packages/net/netkit-telnet/netkit-telnet | 9 + packages/net/netkit-telnet/prototypes.patch | 88 + packages/net/netkit-tftp/netkit-tftp | 9 + packages/net/nfs-utils/nfs-utils | 45 + packages/net/ngrep/bpf.patch | 58 + packages/net/ngrep/ngrep | 7 + packages/net/nmap/nmap | 7 + packages/net/openh323/openh323 | 33 + packages/net/portmap/makefile.patch | 34 + packages/net/portmap/portmap | 23 + packages/net/portmap/portmap.init | 2 + packages/net/portmap/portmap_c.patch | 18 + packages/net/ppp/ppp | 7 + packages/net/pwlib/pwlib | 15 + packages/net/rarpd/libnet.patch | 10 + packages/net/rarpd/rarpd | 10 + packages/net/rp-pppoe/rp-pppoe | 9 + packages/net/rp-pppoe/rp-pppoe.init | 2 + packages/net/samba/nmbd.init | 4 + packages/net/samba/samba | 12 + packages/net/samba/smbd.init | 4 + packages/net/tcpdump/no_pcap_debug.patch | 25 + packages/net/tcpdump/tcpdump | 7 + packages/net/tftp-hpa/tftp-hpa | 7 + packages/net/vpnc/vpnc | 24 + packages/net/wireless_tools/wireless_tools | 21 + packages/optional/nut/nut | 30 + packages/optional/unrealircd/unrealircd | 20 + packages/optional/unrealircd/unrealircd.setup | 14 + packages/science/gnuplot/gnuplot | 21 + packages/science/gnuplot/pdflib.patch | 11 + packages/science/grace/grace | 10 + packages/security/checkpwd/checkpwd | 10 + .../security/checkpwd/include_errno_h.patch | 12 + packages/security/checkpwd/makefile.patch | 29 + packages/security/libgcrypt/libgcrypt | 7 + packages/security/libgpg-error/libgpg-error | 7 + packages/security/openssh/openssh | 33 + packages/security/openssh/openssh.init | 4 + packages/security/openssl/openssl | 23 + packages/security/sudo/sudo | 10 + packages/security/tcp_wrappers/config.patch | 65 + packages/security/tcp_wrappers/tcp_wrappers | 25 + packages/soundtools/alsa/alsa | 49 + packages/soundtools/alsa/no_depmod.patch | 14 + .../soundtools/alsa/no_kconfig_check.patch | 13 + packages/soundtools/ardour/ardour | 7 + packages/soundtools/jack/jack | 11 + packages/soundtools/ladspa/ladspa | 18 + packages/soundtools/liblrdf/liblrdf | 7 + .../soundtools/libmustux/getenv_fix.patch | 11 + packages/soundtools/libmustux/libmustux | 7 + .../soundtools/libsamplerate/libsamplerate | 7 + packages/soundtools/libsndfile/libsndfile | 7 + packages/soundtools/protux/protux | 9 + packages/toolchain/binutils/binutils | 64 + packages/toolchain/gcc/gcc | 75 + packages/toolchain/glibc/glibc | 37 + .../linux-libc-headers/linux-libc-headers | 14 + packages/toolchain/linux/linux | 18 + packages/x11/atk/atk | 10 + packages/x11/expat/expat | 7 + packages/x11/firefox/firefox | 42 + packages/x11/fontconfig/fontconfig | 7 + packages/x11/fontconfig/ft2build.patch | 10 + packages/x11/fontconfig/ftmodule.patch | 11 + packages/x11/freetype/freetype | 13 + packages/x11/fvwm/fvwm | 7 + packages/x11/ghostscript/ghostscript | 23 + packages/x11/gimp-print/gimp-print | 9 + packages/x11/gimp/gimp | 9 + packages/x11/glib/glib | 10 + packages/x11/glib1/glib1 | 11 + packages/x11/gtk+/gtk+ | 12 + packages/x11/gtk+1/gtk+1 | 12 + packages/x11/gv/config.patch | 12 + packages/x11/gv/gv | 27 + packages/x11/imagemagick/imagemagick | 15 + packages/x11/imlib/imlib | 7 + packages/x11/lesstif/lesstif | 12 + packages/x11/libart/libart | 7 + packages/x11/libidl/libidl | 12 + packages/x11/libxml/libxml | 7 + packages/x11/mixerapp/mixerapp | 15 + packages/x11/mozilla/mozilla | 54 + packages/x11/pango/pango | 12 + packages/x11/pkgconfig/pkgconfig | 7 + packages/x11/qt/qt | 42 + packages/x11/synaptics/synaptics | 13 + packages/x11/t1lib/t1lib | 12 + packages/x11/thunderbird/thunderbird | 34 + packages/x11/windowmaker/windowmaker | 9 + packages/x11/wmapm/wmapm | 16 + packages/x11/wmifs/makefile.patch | 11 + packages/x11/wmifs/wmifs | 19 + packages/x11/wmitime/makefile.patch | 11 + packages/x11/wmitime/wmitime | 17 + packages/x11/wmmon/debian.patch | 686 +++ packages/x11/wmmon/makefile.patch | 11 + packages/x11/wmmon/wmmon | 17 + packages/x11/wmnd/wmnd | 7 + packages/x11/wmpower/wmpower | 9 + packages/x11/wmwave/makefile.patch | 15 + packages/x11/wmwave/wmwave | 15 + packages/x11/wterm/wterm | 11 + packages/x11/xaw3d/imakefile.patch | 11 + packages/x11/xaw3d/xaw3d | 19 + packages/x11/xfree86/config.patch | 8 + packages/x11/xfree86/xfree86 | 46 + packages/x11/xhkeys/xhkeys | 11 + packages/x11/xlockmore/xlockmore | 7 + packages/x11/xmms/xmms | 7 + packages/x11/xorg/xorg | 54 + packages/x11/xpdf/xpdf | 12 + scripts/Build | 390 ++ scripts/Build-Distro | 277 + scripts/Build-Package | 48 + scripts/Download | 256 + scripts/Helper | 13 + scripts/Puzzle | 110 + scripts/Update-Tree | 100 + scripts/adapt_local | 45 + scripts/create_cross_env | 359 ++ scripts/optimization | 30 + scripts/subroutines | 257 + scripts/syscheck | 48 + targets/all-dev/include | 21 + targets/default/include | 11 + targets/desktop/include | 35 + targets/fai-server/include | 10 + targets/fefe/include | 29 + targets/mobile/include | 32 + targets/router/include | 43 + targets/toolchain/include | 12 + 452 files changed, 30375 insertions(+) create mode 100644 Config create mode 100644 doc/BUILD create mode 100644 doc/CHANGELOG create mode 100644 doc/Developers create mode 100644 doc/INSTALL create mode 100644 doc/License create mode 100644 doc/README create mode 100644 doc/VERSION create mode 100644 misc/arch/ia32/busybox.config create mode 100644 misc/arch/ia32/linux.config create mode 100644 misc/arch/sparc64/linux.config create mode 100644 misc/crossbuild/fake_utsname/Makefile create mode 100644 misc/crossbuild/fake_utsname/fake_utsname.c create mode 100644 misc/crossbuild/fake_utsname/fake_utsname.o create mode 100644 misc/hdw-tools/btee.c create mode 100644 misc/hdw-tools/hdw-get create mode 100755 misc/internal/make_tar.sh create mode 100644 misc/sysfiles/etc/HOSTNAME create mode 100644 misc/sysfiles/etc/conf/bootdown create mode 100644 misc/sysfiles/etc/conf/kernel create mode 100644 misc/sysfiles/etc/conf/network create mode 100644 misc/sysfiles/etc/conf/profile create mode 100644 misc/sysfiles/etc/dircolors create mode 100644 misc/sysfiles/etc/fstab create mode 100644 misc/sysfiles/etc/group create mode 100644 misc/sysfiles/etc/host.conf create mode 100644 misc/sysfiles/etc/hosts create mode 100755 misc/sysfiles/etc/init.d/boot create mode 100755 misc/sysfiles/etc/init.d/cron create mode 100755 misc/sysfiles/etc/init.d/down create mode 100755 misc/sysfiles/etc/init.d/network create mode 100755 misc/sysfiles/etc/init.d/nscd create mode 100755 misc/sysfiles/etc/init.d/rc create mode 100755 misc/sysfiles/etc/init.d/sysklogd create mode 100755 misc/sysfiles/etc/initscript create mode 100644 misc/sysfiles/etc/inittab create mode 100644 misc/sysfiles/etc/issue create mode 100644 misc/sysfiles/etc/ld.so.conf create mode 100644 misc/sysfiles/etc/networks create mode 100644 misc/sysfiles/etc/nsswitch.conf create mode 100644 misc/sysfiles/etc/passwd create mode 100644 misc/sysfiles/etc/profile create mode 100644 misc/sysfiles/etc/resolv.conf create mode 100644 misc/sysfiles/etc/shadow create mode 100644 misc/sysfiles/etc/shells create mode 100644 misc/sysfiles/etc/syslog.conf create mode 100644 packages/base/00-copy-system-files/00-copy-system-files create mode 100644 packages/base/00-dirtree/00-dirtree create mode 100644 packages/base/00-final-base-conf/00-final-base-conf create mode 100644 packages/base/00-init-conf/00-init-conf create mode 100644 packages/base/00-init-conf/cron.init create mode 100644 packages/base/00-init-conf/ctraltdel.init create mode 100644 packages/base/00-init-conf/devfs.init create mode 100644 packages/base/00-init-conf/devfsd.init create mode 100644 packages/base/00-init-conf/fsck.init create mode 100644 packages/base/00-init-conf/hostname.init create mode 100644 packages/base/00-init-conf/ifconfig.init create mode 100644 packages/base/00-init-conf/ifconfiglo.init create mode 100644 packages/base/00-init-conf/kernel.init create mode 100644 packages/base/00-init-conf/klogd.init create mode 100644 packages/base/00-init-conf/mkshm.init create mode 100644 packages/base/00-init-conf/mountdev.init create mode 100644 packages/base/00-init-conf/mountfs.init create mode 100644 packages/base/00-init-conf/mountproc.init create mode 100644 packages/base/00-init-conf/mountro.init create mode 100644 packages/base/00-init-conf/mountrw.init create mode 100644 packages/base/00-init-conf/mountshm.init create mode 100644 packages/base/00-init-conf/mtab.init create mode 100644 packages/base/00-init-conf/route.init create mode 100644 packages/base/00-init-conf/routelo.init create mode 100644 packages/base/00-init-conf/swapon.init create mode 100644 packages/base/00-init-conf/syslogd.init create mode 100644 packages/base/00-small-base-conf/00-small-base-conf create mode 100644 packages/base/autoconf/autoconf create mode 100644 packages/base/automake/automake create mode 100644 packages/base/bash/avoid_keypad_sigsev.patch create mode 100644 packages/base/bash/bash create mode 100644 packages/base/bash/no_space_append.patch create mode 100644 packages/base/bash/variable_expansion.patch create mode 100644 packages/base/bash/vi_repeat.patch create mode 100644 packages/base/bdb/bdb create mode 100644 packages/base/bdb/lock.patch create mode 100644 packages/base/bdb/mp.patch create mode 100644 packages/base/binutils/binutils create mode 100644 packages/base/bison/bison create mode 100644 packages/base/bzip2/bzip2 create mode 100644 packages/base/coreutils/coreutils create mode 100644 packages/base/coreutils/coreutils_dupes.patch create mode 100644 packages/base/coreutils/coreutils_uname.patch create mode 100644 packages/base/cvs/cvs create mode 100644 packages/base/diffutils/diffutils create mode 100644 packages/base/e2fsprogs/e2fsprogs create mode 100644 packages/base/ed/ed create mode 100644 packages/base/ed/ed_mkstemp.patch create mode 100644 packages/base/file/file create mode 100644 packages/base/findutils/findutils create mode 100644 packages/base/flex/debian_fixes.patch create mode 100644 packages/base/flex/flex create mode 100644 packages/base/gawk/gawk create mode 100644 packages/base/gcc/gcc create mode 100644 packages/base/gcc/no_fix_includes.patch create mode 100644 packages/base/gcc/undef_gnu_src.patch.dietlibc create mode 100644 packages/base/gettext/gettext create mode 100644 packages/base/glibc/glibc create mode 100644 packages/base/grep/grep create mode 100644 packages/base/groff/groff create mode 100644 packages/base/gzip/gzip create mode 100644 packages/base/hotplug/hotplug create mode 100644 packages/base/kbd/kbd create mode 100644 packages/base/less/less create mode 100644 packages/base/libtool/libtool create mode 100644 packages/base/linux-libc-headers/linux-libc-headers create mode 100644 packages/base/linux/linux create mode 100644 packages/base/m4/m4 create mode 100644 packages/base/make/make create mode 100644 packages/base/man-pages/man-pages create mode 100644 packages/base/man/man create mode 100644 packages/base/man/man_80cols.patch create mode 100644 packages/base/man/man_manpath.patch create mode 100644 packages/base/man/man_pager.patch create mode 100644 packages/base/module-init-tools/module-init-tools create mode 100644 packages/base/ncurses/ncurses create mode 100644 packages/base/net-tools/gcc_34.patch create mode 100644 packages/base/net-tools/net-tools create mode 100644 packages/base/netkit-base/netkit-base create mode 100644 packages/base/netkit-base/netkit-base.init create mode 100644 packages/base/nvi/catman_sucks.patch create mode 100644 packages/base/nvi/errno.patch create mode 100644 packages/base/nvi/ncurses.patch create mode 100644 packages/base/nvi/no-machine-setting.patch create mode 100644 packages/base/nvi/nvi create mode 100644 packages/base/patch/patch create mode 100644 packages/base/perl/perl create mode 100644 packages/base/perl/perl_libc.patch.1 create mode 100644 packages/base/procps/procps create mode 100644 packages/base/psmisc/psmisc create mode 100644 packages/base/sed/permissions.patch.2 create mode 100644 packages/base/sed/sed create mode 100644 packages/base/shadow/shadow create mode 100644 packages/base/sysklogd/kernel_headers.patch create mode 100644 packages/base/sysklogd/signal.patch create mode 100644 packages/base/sysklogd/sysklogd create mode 100644 packages/base/sysvinit/sysvinit create mode 100644 packages/base/tar/tar create mode 100644 packages/base/termcap/termcap create mode 100644 packages/base/texinfo/texinfo create mode 100644 packages/base/udev/init_udev.sh create mode 100644 packages/base/udev/udev create mode 100644 packages/base/util-linux/kernel_headers.patch create mode 100644 packages/base/util-linux/util-linux create mode 100644 packages/base/wget/allow-tilde-in-url.patch create mode 100644 packages/base/wget/wget create mode 100644 packages/base/zlib/zlib create mode 100644 packages/devel/emacs/emacs create mode 100644 packages/devel/emacs/xaw_arrow_scrollbar.patch create mode 100644 packages/devel/gdb/gdb create mode 100644 packages/devel/gdbm/gdbm create mode 100644 packages/devel/orbit/orbit create mode 100644 packages/devel/python/python create mode 100644 packages/devel/tcltk/tcltk create mode 100644 packages/diet/dietlibc/dietlibc create mode 100644 packages/diet/fgetty/fgetty create mode 100644 packages/diet/minit/minit create mode 100644 packages/hackbard/acroread/acroread create mode 100644 packages/hackbard/acroread/install.patch create mode 100644 packages/hackbard/apache/apache create mode 100644 packages/hackbard/apache/apache.init create mode 100644 packages/hackbard/avra/avra create mode 100644 packages/hackbard/avra/avra_manpage create mode 100644 packages/hackbard/bc/bc create mode 100644 packages/hackbard/cdrtools/cdrtools create mode 100644 packages/hackbard/cdrtools/u8.patch create mode 100644 packages/hackbard/cron/cron create mode 100644 packages/hackbard/cron/cron.init create mode 100644 packages/hackbard/cron/cron_3.0pl1-72.patch create mode 100644 packages/hackbard/cups/cups create mode 100644 packages/hackbard/cups/cups.init create mode 100644 packages/hackbard/cups/manpages.patch create mode 100644 packages/hackbard/curl/curl create mode 100644 packages/hackbard/cvsd/cvsd create mode 100644 packages/hackbard/cvsd/cvsd.init create mode 100644 packages/hackbard/cvsd/cvsd.setup create mode 100644 packages/hackbard/dfbpoint/dfbpoint create mode 100644 packages/hackbard/dfbpoint/render_c.patch create mode 100644 packages/hackbard/dfbsee/dfbsee create mode 100644 packages/hackbard/directfb/directfb create mode 100644 packages/hackbard/elftoaout/elftoaout create mode 100644 packages/hackbard/fbset/fbset create mode 100644 packages/hackbard/fbset/makefile.patch create mode 100644 packages/hackbard/gpsd/gpsd create mode 100644 packages/hackbard/gpsd/include_stdarg_h.patch create mode 100644 packages/hackbard/gtk-gnutella/configure.patch create mode 100644 packages/hackbard/gtk-gnutella/gtk-gnutella create mode 100644 packages/hackbard/hdparm/hdparm create mode 100644 packages/hackbard/hdparm/readahead.patch create mode 100644 packages/hackbard/hostap/hostap create mode 100644 packages/hackbard/ipcheck/ipcheck create mode 100644 packages/hackbard/irssi/irssi create mode 100644 packages/hackbard/isdn4k-utils/autoconf.patch create mode 100644 packages/hackbard/isdn4k-utils/isdn4k-utils create mode 100644 packages/hackbard/isdn4k-utils/no_make_dev.patch create mode 100644 packages/hackbard/isdn4k-utils/options_c.patch create mode 100644 packages/hackbard/libunicode/libunicode create mode 100644 packages/hackbard/licq/licq create mode 100644 packages/hackbard/licq/nptl.patch create mode 100644 packages/hackbard/lphdisk/lphdisk create mode 100644 packages/hackbard/lphdisk/usage.patch create mode 100644 packages/hackbard/lprng/lprng create mode 100644 packages/hackbard/lprng/lprng.init create mode 100644 packages/hackbard/ltrace/ltrace create mode 100644 packages/hackbard/lynx/lynx create mode 100644 packages/hackbard/magicfilter/magicfilter create mode 100644 packages/hackbard/magicfilter/no_cfmagic.patch create mode 100644 packages/hackbard/mhonarc/makefile_pl.patch create mode 100644 packages/hackbard/mhonarc/mhonarc create mode 100644 packages/hackbard/minicom/minicom create mode 100644 packages/hackbard/minimalist/minimalist create mode 100644 packages/hackbard/mppp/mppp create mode 100644 packages/hackbard/openldap/openldap create mode 100644 packages/hackbard/parted/parted create mode 100644 packages/hackbard/pciutils/pciutils create mode 100644 packages/hackbard/pcmcia-cs/pcmcia-cs create mode 100644 packages/hackbard/pcmcia-cs/use_linux_srctree.patch create mode 100644 packages/hackbard/pine/pine create mode 100644 packages/hackbard/procmail/procmail create mode 100644 packages/hackbard/raptor/raptor create mode 100644 packages/hackbard/rcs/conf_sh.patch create mode 100644 packages/hackbard/rcs/rcs create mode 100644 packages/hackbard/root-tail/root-tail create mode 100644 packages/hackbard/rsync/rsync create mode 100644 packages/hackbard/screen/screen create mode 100644 packages/hackbard/scummvm/scummvm create mode 100644 packages/hackbard/sendmail/Makefile create mode 100644 packages/hackbard/sendmail/aliases create mode 100644 packages/hackbard/sendmail/local-host-names create mode 100644 packages/hackbard/sendmail/sendmail create mode 100644 packages/hackbard/sendmail/sendmail.init create mode 100644 packages/hackbard/sendmail/sendmail.setup create mode 100644 packages/hackbard/sendmail/site.config.m4 create mode 100644 packages/hackbard/sersniff/sersniff create mode 100644 packages/hackbard/sersniff/sersniff-fprintf-bug.patch create mode 100644 packages/hackbard/sp12/sp12 create mode 100644 packages/hackbard/strace/strace create mode 100644 packages/hackbard/tetex/tetex create mode 100644 packages/hackbard/tpconfig/tpconfig create mode 100644 packages/hackbard/unzip/unzip create mode 100644 packages/hackbard/vim/vim create mode 100644 packages/hackbard/wine/wine create mode 100644 packages/hackbard/xdirectfb/xdirectfb create mode 100644 packages/hackbard/zip/zip create mode 100644 packages/hpc/lam/lam create mode 100644 packages/hpc/openmosixuserland/openmosixuserland create mode 100644 packages/ia32/bin86/bin86 create mode 100644 packages/ia32/bootdisk/bootdisk create mode 100644 packages/ia32/bootdisk/issue create mode 100644 packages/ia32/bootdisk/kernel_2_6_x.patch create mode 100644 packages/ia32/bootdisk/rules_make.patch create mode 100644 packages/ia32/lilo/kernel_2_6_x.patch create mode 100644 packages/ia32/lilo/lilo create mode 100644 packages/ia32/nasm/nasm create mode 100644 packages/ia32/syslinux/no_syslinux_exe.patch create mode 100644 packages/ia32/syslinux/syslinux create mode 100644 packages/multimedia/aalib/aalib create mode 100644 packages/multimedia/audiofile/audiofile create mode 100644 packages/multimedia/avifile/avifile create mode 100644 packages/multimedia/faad2/faad2 create mode 100644 packages/multimedia/faad2/no_rpm_makefile.patch create mode 100644 packages/multimedia/ffmpeg/ffmpeg create mode 100644 packages/multimedia/flite/flite create mode 100644 packages/multimedia/lame/lame create mode 100644 packages/multimedia/liba52/liba52 create mode 100644 packages/multimedia/libdivxdecore/libdivxdecore create mode 100644 packages/multimedia/libdvbpsi/libdvbpsi create mode 100644 packages/multimedia/libdvdcss/libdvdcss create mode 100644 packages/multimedia/libdvdplay/libdvdplay create mode 100644 packages/multimedia/libdvdread/libdvdread create mode 100644 packages/multimedia/libflash/libflash create mode 100644 packages/multimedia/libflash/shape.patch create mode 100644 packages/multimedia/libjpeg/libjpeg create mode 100644 packages/multimedia/libmad/libmad create mode 100644 packages/multimedia/libmpeg2/libmpeg2 create mode 100644 packages/multimedia/libmpeg3/libmpeg3 create mode 100644 packages/multimedia/libmpeg3/makefile.patch create mode 100644 packages/multimedia/libogg/libogg create mode 100644 packages/multimedia/libpdf/libpdf create mode 100644 packages/multimedia/libpng/libpng create mode 100644 packages/multimedia/libpng/makefile.linux.patch create mode 100644 packages/multimedia/libtiff/libtiff create mode 100644 packages/multimedia/libtiff/manpages.patch create mode 100644 packages/multimedia/libungif/libungif create mode 100644 packages/multimedia/libvorbis/libvorbis create mode 100644 packages/multimedia/mplayer/kernel_2_6.patch create mode 100644 packages/multimedia/mplayer/mplayer create mode 100644 packages/multimedia/openmotif/no_animate_demo.patch create mode 100644 packages/multimedia/openmotif/openmotif create mode 100644 packages/multimedia/sdl/sdl create mode 100644 packages/multimedia/speex/speex create mode 100644 packages/multimedia/transcode/transcode create mode 100644 packages/multimedia/vlc/vlc create mode 100644 packages/multimedia/vobcopy/vobcopy create mode 100644 packages/multimedia/xawtv/xawtv create mode 100644 packages/multimedia/xvid/xvid create mode 100644 packages/net/bind/bind create mode 100644 packages/net/bind/named.init create mode 100644 packages/net/bridge-utils/bridge-utils create mode 100644 packages/net/dhcp/dhcp create mode 100644 packages/net/dhcp/dhcp.init create mode 100644 packages/net/ethereal/ethereal create mode 100644 packages/net/ettercap/ettercap create mode 100644 packages/net/ipsec-tools/ipsec-tools create mode 100644 packages/net/iptables/iptables create mode 100644 packages/net/iptables/libip6tc.patch create mode 100644 packages/net/iptables/libiptc.patch create mode 100644 packages/net/libnet/libnet create mode 100644 packages/net/libpcap/libpcap create mode 100644 packages/net/netkit-ftp/netkit-ftp create mode 100644 packages/net/netkit-rsh/netkit-rsh create mode 100644 packages/net/netkit-telnet/line-name.patch create mode 100644 packages/net/netkit-telnet/netkit-telnet create mode 100644 packages/net/netkit-telnet/prototypes.patch create mode 100644 packages/net/netkit-tftp/netkit-tftp create mode 100644 packages/net/nfs-utils/nfs-utils create mode 100644 packages/net/ngrep/bpf.patch create mode 100644 packages/net/ngrep/ngrep create mode 100644 packages/net/nmap/nmap create mode 100644 packages/net/openh323/openh323 create mode 100644 packages/net/portmap/makefile.patch create mode 100644 packages/net/portmap/portmap create mode 100644 packages/net/portmap/portmap.init create mode 100644 packages/net/portmap/portmap_c.patch create mode 100644 packages/net/ppp/ppp create mode 100644 packages/net/pwlib/pwlib create mode 100644 packages/net/rarpd/libnet.patch create mode 100644 packages/net/rarpd/rarpd create mode 100644 packages/net/rp-pppoe/rp-pppoe create mode 100644 packages/net/rp-pppoe/rp-pppoe.init create mode 100644 packages/net/samba/nmbd.init create mode 100644 packages/net/samba/samba create mode 100644 packages/net/samba/smbd.init create mode 100644 packages/net/tcpdump/no_pcap_debug.patch create mode 100644 packages/net/tcpdump/tcpdump create mode 100644 packages/net/tftp-hpa/tftp-hpa create mode 100644 packages/net/vpnc/vpnc create mode 100644 packages/net/wireless_tools/wireless_tools create mode 100644 packages/optional/nut/nut create mode 100644 packages/optional/unrealircd/unrealircd create mode 100644 packages/optional/unrealircd/unrealircd.setup create mode 100644 packages/science/gnuplot/gnuplot create mode 100644 packages/science/gnuplot/pdflib.patch create mode 100644 packages/science/grace/grace create mode 100644 packages/security/checkpwd/checkpwd create mode 100644 packages/security/checkpwd/include_errno_h.patch create mode 100644 packages/security/checkpwd/makefile.patch create mode 100644 packages/security/libgcrypt/libgcrypt create mode 100644 packages/security/libgpg-error/libgpg-error create mode 100644 packages/security/openssh/openssh create mode 100644 packages/security/openssh/openssh.init create mode 100644 packages/security/openssl/openssl create mode 100644 packages/security/sudo/sudo create mode 100644 packages/security/tcp_wrappers/config.patch create mode 100644 packages/security/tcp_wrappers/tcp_wrappers create mode 100644 packages/soundtools/alsa/alsa create mode 100644 packages/soundtools/alsa/no_depmod.patch create mode 100644 packages/soundtools/alsa/no_kconfig_check.patch create mode 100644 packages/soundtools/ardour/ardour create mode 100644 packages/soundtools/jack/jack create mode 100644 packages/soundtools/ladspa/ladspa create mode 100644 packages/soundtools/liblrdf/liblrdf create mode 100644 packages/soundtools/libmustux/getenv_fix.patch create mode 100644 packages/soundtools/libmustux/libmustux create mode 100644 packages/soundtools/libsamplerate/libsamplerate create mode 100644 packages/soundtools/libsndfile/libsndfile create mode 100644 packages/soundtools/protux/protux create mode 100644 packages/toolchain/binutils/binutils create mode 100644 packages/toolchain/gcc/gcc create mode 100644 packages/toolchain/glibc/glibc create mode 100644 packages/toolchain/linux-libc-headers/linux-libc-headers create mode 100644 packages/toolchain/linux/linux create mode 100644 packages/x11/atk/atk create mode 100644 packages/x11/expat/expat create mode 100644 packages/x11/firefox/firefox create mode 100644 packages/x11/fontconfig/fontconfig create mode 100644 packages/x11/fontconfig/ft2build.patch create mode 100644 packages/x11/fontconfig/ftmodule.patch create mode 100644 packages/x11/freetype/freetype create mode 100644 packages/x11/fvwm/fvwm create mode 100644 packages/x11/ghostscript/ghostscript create mode 100644 packages/x11/gimp-print/gimp-print create mode 100644 packages/x11/gimp/gimp create mode 100644 packages/x11/glib/glib create mode 100644 packages/x11/glib1/glib1 create mode 100644 packages/x11/gtk+/gtk+ create mode 100644 packages/x11/gtk+1/gtk+1 create mode 100644 packages/x11/gv/config.patch create mode 100644 packages/x11/gv/gv create mode 100644 packages/x11/imagemagick/imagemagick create mode 100644 packages/x11/imlib/imlib create mode 100644 packages/x11/lesstif/lesstif create mode 100644 packages/x11/libart/libart create mode 100644 packages/x11/libidl/libidl create mode 100644 packages/x11/libxml/libxml create mode 100644 packages/x11/mixerapp/mixerapp create mode 100644 packages/x11/mozilla/mozilla create mode 100644 packages/x11/pango/pango create mode 100644 packages/x11/pkgconfig/pkgconfig create mode 100644 packages/x11/qt/qt create mode 100644 packages/x11/synaptics/synaptics create mode 100644 packages/x11/t1lib/t1lib create mode 100644 packages/x11/thunderbird/thunderbird create mode 100644 packages/x11/windowmaker/windowmaker create mode 100644 packages/x11/wmapm/wmapm create mode 100644 packages/x11/wmifs/makefile.patch create mode 100644 packages/x11/wmifs/wmifs create mode 100644 packages/x11/wmitime/makefile.patch create mode 100644 packages/x11/wmitime/wmitime create mode 100644 packages/x11/wmmon/debian.patch create mode 100644 packages/x11/wmmon/makefile.patch create mode 100644 packages/x11/wmmon/wmmon create mode 100644 packages/x11/wmnd/wmnd create mode 100644 packages/x11/wmpower/wmpower create mode 100644 packages/x11/wmwave/makefile.patch create mode 100644 packages/x11/wmwave/wmwave create mode 100644 packages/x11/wterm/wterm create mode 100644 packages/x11/xaw3d/imakefile.patch create mode 100644 packages/x11/xaw3d/xaw3d create mode 100644 packages/x11/xfree86/config.patch create mode 100644 packages/x11/xfree86/xfree86 create mode 100644 packages/x11/xhkeys/xhkeys create mode 100644 packages/x11/xlockmore/xlockmore create mode 100644 packages/x11/xmms/xmms create mode 100644 packages/x11/xorg/xorg create mode 100644 packages/x11/xpdf/xpdf create mode 100755 scripts/Build create mode 100755 scripts/Build-Distro create mode 100755 scripts/Build-Package create mode 100755 scripts/Download create mode 100755 scripts/Helper create mode 100755 scripts/Puzzle create mode 100755 scripts/Update-Tree create mode 100755 scripts/adapt_local create mode 100755 scripts/create_cross_env create mode 100755 scripts/optimization create mode 100755 scripts/subroutines create mode 100755 scripts/syscheck create mode 100644 targets/all-dev/include create mode 100644 targets/default/include create mode 100644 targets/desktop/include create mode 100644 targets/fai-server/include create mode 100644 targets/fefe/include create mode 100644 targets/mobile/include create mode 100644 targets/router/include create mode 100644 targets/toolchain/include diff --git a/Config b/Config new file mode 100644 index 0000000..34a4130 --- /dev/null +++ b/Config @@ -0,0 +1,68 @@ +# hdw-linux Config file +# +# this file contains build options +# +# author: hackbard +# + +# start + +export hdw_version="0.3" # version of hdw-linux + +export hdw_target="default" # which target to build + # currently: + # toolchain - just the toolchain (stable) + # default - pure base (stable) + # mobile - my mobile hackstation (stable) + # desktop - all packages (stable) + # router - packages need for routers + # (stable) # fai-server - packages needed for + # automated install of hdw + # (devel) + # all-dev - all possible packages (devel) + # fefe - dietlibc based target (devel) + +export hdw_arch="ia32" # which architecture to build for + # currently: ia32 - x86 architectures + # sparc - 32bit sparc + # sparc64 - 64bit sparc + # ppc - powerpc's + +export hdw_arch_opt="" # choose optimization + # currently: ia32 : i[3-6]86 + # sparc64 : sparc_v9 + # sparc : sparc_v[7-8] + # ppc : "" (still in dev) + +export hdw_use_dietlibc="0" # 0: use gnu c library (glibc) + # 1: use dietlibc + +export hdw_opt="3" # choose -O optimization value + # default : 3 + +export hdw_crossbuild="0" # 0: native build + # 1: crossbuild - warning: devel! + +export hdw_real_build="" # set real build arch in case hdw_crossbuild is + # set to 1 & the scripts guess wrong build arch + # (example: sparc64 with 32 bit userland) + +export hdw_build_id="$hdw_target-$hdw_arch-$hdw_arch_opt-$hdw_version" # id + +export hdw_build_dir="" # mountpoint of your partition on which you + # want to build hdw-linux, eg: /mnt/hdw-linux + # make sure it exists and has enough space! + +export hdw_make_package="0" # 0: just install on $hdw_build_dir + # 1: also make binary tars + +export hdw_abort="1" # 0: continue building when package build fails + # 1: abort when package build fails + +export hdw_debug_buildenv="1" # 0: do not output environment variables + # 1: print env variables before build + +export hdw_stage1_prefix="" # specify the default prefix used in stage 1 + # default: static (historical reason) + +# end diff --git a/doc/BUILD b/doc/BUILD new file mode 100644 index 0000000..ab68eee --- /dev/null +++ b/doc/BUILD @@ -0,0 +1,128 @@ +# hdw - linux BUILD file + +welcome to hdw-linux-0.3-dev + +this is a short introduction on how to build hdw-linux. it is supposed to work +at least for me. though this is dev and may hurt your baby, be warned. i mean +it! + +requirements: +------------- + +- working linux system, including gcc and other essential development tools. + ( latest versions of automake, autoconf, m4 recommended ) +- wget, cvs +- internet connection, or local server using -mirror option +- devfs supporting kernel. +- an empty partition (1.5 gb) for building, and 650 mb for sources. + (the default target is smaller (900mb & ~200mb) + +what to do: (for the impatient) +------------------------------- + + build your distribution: + ------------------------ + +- get the hdw-linux source from http://hackdaworld.dyndns.org/hdw-linux + + example: + mkdir -p /mnt/hdw && cd /mnt/hdw + wget http://hackdaworld.dyndns.org/hdw-linux/hdw-linux-0.3-dev-*.tar.bz2 + tar xvfI hdw-linux-0.3-dev-*.tar.bz2 + +- create a filesystem on the empty partition and mount it wherever you want to. + + example: + mke2fs /dev/ide/host0/bus0/target0/lun0/part6 + mkdir /mnt/hdw/hdw-build + mount /dev/ide/host0/bus0/target0/lun0/part6 /mnt/hdw/hdw-build + +- edit ./Config and insert the above mountpoint to hdw_build_dir and + chose a target. + + example: + cd hdw-linux* + vi Config + + - modify the following line to read: + export hdw_build_dir="/mnt/hdw/hdw-build" + + - choose your target: + export hdw_target="mobile" + +- if you want to add targets/packages made by the hdw hackers & users community + run: (this is optional - in fact it is maybe causing harm to your build) + + example: + ./scripts/Update-Tree + + (maybe you want to chose another target now in ./Config -- see 'ls ./targets') + +- run ./scripts/Puzzle to create the target depending PKGS files. + + example: + ./scripts/Puzzle + +- run ./scripts/Download to fetch the sources needed to build that target. + alternatively run ./scripts/Download -mirror + + example: + ./scripts/Download + - after that, if you didnt get all the sources: + ./scripts/Download -mirror http://we-have-no-mrror-by-now/hdw/ + +- make Build-Distro executable (only needed in some dev snapshots afaik) + + example: + chmod 700 scripts/Build-Distro + +- you may now start building: + + example ./scripts/Build-Distro > build.log. 2>&1; + tail -f ./build.log + + + optional: create binaries: + -------------------------- + + you have the possibility to create binary tar.bz2 packages. in that way + you can easily install the created system even on other computers. it is + also possible to install them on a running system, package installations + via net, etc... + +- create binaries: + + example: + + - create binary packages of all packages from the target + ./scripts/Create-Binary all + + - create single packages + ./scripts/Create-Binary -package gcc (-tar-name gcc2) + + (where arguments in the brackets are optional, default is package name) + + after that you can install the packages. you can even use a minimal + rescue disk from another distribution (it should have tar and bzip + on it) and install your hdw-linux distribution. in the future dev + snapshots of hdw, a hdw rescue-disk pseudo package will be available. + +- install packages from another non hdw system: + + example: + . ./misc/hdw-tools/hdw-get install /mnt/hdw-target gcc + + +for further information on how to install hdw-linux refer to the INSTALL file +in doc/ directory. + + +troubleshooting: +---------------- + +- visit: irc.hackdaworld.dyndns.org, #hackdaworld +- visit: http://www.hackdaworld.dyndns.org/contents/mailing-list/ +- visit: www.linuxfromscratch.org, www.linuxdoc.org, www.rocklinux.org ;) + + +regards hackbard diff --git a/doc/CHANGELOG b/doc/CHANGELOG new file mode 100644 index 0000000..0cbe1b2 --- /dev/null +++ b/doc/CHANGELOG @@ -0,0 +1,1696 @@ +*) 2004-07-21 + +- fixed firefox and mozilla config typo + +############################################################################ +# # +# - initial checkin of new hdw-linux cvs repository for active development # +# # +# cvs -d:pserver:anonymous@cvs.hackdaworld.dyndns.org:/hdw-linux \ # +# co hdw-linux # +# # +############################################################################ + +*) 2004-07-20 + +- use stable vlc release +- fixed ffmpeg and mplayer package +- moved some download locations to soon appearing 0.3 version directory +- build imlib before ffmpeg +- fixed faad2 +- fixed licq (added nptl.patch) +- xpdf source package added +- gtk-gnutella fixed (added patch) +- added debian patch for wmmon (await disk i/o patch soon) + +*) 2004-07-19 + +- added missing '"' for hdw-get.conf +- downgraded gtk+1 (same issue as for glib1, to have real 1 version) +- fixed pango and gtk+ to build with xft support +- fixed root-tail package +- added patch for gnuplot for new pdflib + cruel hack to libpng12/pngconf.h +- downgraded glib1 +- fixed scummvm +- fixed dfbsee + +*) 2004-07-18 + +- minor fixes to xdirectfb (still not compiling!) +- enabled sysfs in directfb +- fixed mppp package +- build gnuplot & grace after having build tetex +- removed tetex fmtutil patch, changed buildorder + added bison fix +- corrected rp-pppoe dowmload location +- updated dhcp & pcmcia-cs +- new dll codecs for mplayer + +*) 2004-07-17 + +- removed makefile patch for wmapm, obsolete +- fixed synaptics strange Makefile (uh!) +- changed freetype download location +- fixed qt build +- updated pine & correct install of imapd.8 +- cahnges in build order for expat freetype and fontconfig +- downgraded fontconfig + added some patches +- added patch for libtiff to have right man install path +- corrected install pathes for vobcopy +- only executing ./configure in vpnc if available +- no make clean in vobcopy +- updated namservers in etc/resolv.conf + +*) 2004-07-16 + +- implemented hdw_make_package feature +- moved that implementation to Buid-Distro script +- minor fixes +- fixed some multimedia pckages +- fixed iptables (though a lot of warnings remain - fixed?) +- fixed ngrep pcap/bpf problems +- no patching for openh323 +- downgraded tftp-hpa + +*) 2004-07-15 + +- updated iptables +- added pciutils package +- added missing errno definitions to CFLAGS for ipsec-tools +- fixed adding deps/build/$package file to flist +- added avra manpage manually +- added tcpdump patch to not use pcap_debug +- added timezone link to 00-small-base-conf +- fixed bdb to link properly against nptl +- removed obsolete perl patch to link against bdb +- fixed mhonarc package +- fixed sendmail compilaton: introduced .setup, definitions via site.config.m4 +- changed build priority for ipsec-tools +- manual copy of libnet-config in libnet package + +*) 2004-07-14 + +- added pcmcia/cardbus support to linux.config + added pcmcia patch +- added patch for hdparm to buuild properly in 2.6 kernel environment +- added patch for cdrtools to build properly for 2.6 kernels + +*) 2004-07-13 + +- implemented error check for cvs downloads +- implemented dependency calculation for stage >=3 (devel) +- more stage 3 package updates +- added firefox & thunderbird + adjusted target include files + +*) 2004-07-12 + +- more stage 3 package updates +- auto download package if src not available + +*) 2004-07-11 + +- several package updates (stage 3 - all-dev) +- changes to setup stuff +- fixed targets + +*) 2004-07-10 + +- added fai-server target +- no udevstart logging in Build-Distro +- fixed syslinux package +- default root passwd changed to 'hdw' (without quotes) +- modified some targets to not include syslinux package +- more fixes for bootdisk package + skip build +- fixed lilo & sysklogd (include kernel headers) +- fixed package 00-copy-system-files +- corrected version in bin86 +- added patches for liloand sysklogd to compile properly in 2.6 environment + +*) 2004-07-09 + +- fixed psmisc move binary bug +- corrected psmisc/e2fsprogs download location +- bdb patches added +- perl mustn't tyr/use db libs, as of U pthread_* refs in libdb + (maybe due to cvs libc ?) +- fixed tar command in net-tools package +- no creation of /udev directory (00-dirtree) +- finaly fixed nvi package +- build terrmcap before curses & nvi +- recreated bdb package, downgraded nvi (nvi.1.49-Linux) + +*) 2004-07-08 + +- fixed gcc g++ and f77 package extraction +- copy linux .config before running make +- skip copying services and protocol file in netkit-base package +- build POSIX.pm in perl stage 1 +- fixed udev make_conf and install_conf +- unset AR for compiling static version of zlib +- begin fixing nvi package + +*) 2004-07-07 + +- removed -m tar option for autoextracting package (casued bison trouble) +- fixed flex typo +- use cvs version of glibc +- corrected specfile location (toolchain binutils) +- syscheck for stage "0 1" +- use set -e to return immediately in case of errors (Build script) +- nicer check for hdw_target variable in Config script + +*) 2004-06-30 + +- downgraded toolchain/base gcc and glibc package (caused errors in chroot(?)) +- updated linux-libc-headers, linux and bison + +*) 2004-06-29 + +- updated binutils from kernel ftp, gnu had problems with texinfo + +*) 2004-06-28 + +- congrats to Hunz, he is 23 years now - DANGEROUS +- added libgcrypt, libpgp-error and vpnc package + +*) 2004-06-26 + +- updated to bison 1.50 +- binutils (2-4): added specs to flist_pruned +- downgraded bison (-> 1.35) + +*) 2004-06-24 + +- binutils (2-4): fixed flist_path +- glibc download location changed +- more elegant fix to "empty binutils stage 2 flist" problem + +*) 2004-06-23 + +- fixed cvs package, bootdisk priority -> 19 +- fixed Build script for empty flist.* files +- more stage 2 base package fixes +- adapted misc stuff for udev + +*) 2004-06-21 + +- stage 2 base fixes (->gzip) +- added NOTES file remember important stuff + +*) 2004-06-20 + +- fixed some more base packages (stage 2) +- fixed stage2 preperation code +- hdw-get knows new flist files + +*) 2004-06-18 + +- added docdir variable to stage 0/1 builds +- fixed udev package (stage1&2) +- added patch to fix strange (host system ?) bison bug + +*) 2004-06-17 + +- base stage 1 fixes +- toolchain fixes + +*) 2004-06-16 + +- fixed flist settings for stage 0 +- use wc -c for byte counting in glibc package + +*) 2004-06-12 + +- hacked new build order concept, new stage 0 - the toolchain +- added toolchain target +- modified packages to fit new concepts +- updated some base packages + +*) 2004-06-06 + +- added linux-libc-headres package in toolchain, untested!! +- updated remaining base packages + toolchain + +*) 2004-06-01 + +- updated some base packages, untested! (incomplete, last package perl) +- updated module-init-tools -> 3.0 (untested) +- fixed download location of bridge-utils (not updated) + +*) 2004-05-27 + +- replaced new xfree86 by xorg (due to license stuff) +- updated freetpye(2) package +- fixed udev init +- hostap cleanup +- updated xfree86 4.4.0 (untested) - skipped devfs patches (devfsd,udev) + +*) 2004-05-24 + +- wireless_tools manpage installation in shorter command +- seperated pcmcia-cs and hostap package +- updated linux kernel 2.6.6 +- added udev package (devfs still default) + +*) 2004-05-13 + +- linux 2.6.5 update +- mplayer autodetects external faad(2), codecs.conf, qtdll fix + +*) 2004-04-22 + +- network ipsec changes + setkey.conf generation + +*) 2004-03-13 + +- updated gettext (0.14.1) +- sysfs -> sys (fstab & 00-dirtree) +- added ipsec-tools package +- linux 2.6.4 update +- corrected target include files + +*) 2004-02-18 + +- linux 2.6.3 update + +*) 2004-02-06 + +- linux 2.6.2 update + +*) 2004-02-01 + +- added synaptics touchpad xfree86 driver + +*) 2004-01-31 + +- updated to xfree 4.3.0.1 +- updated to linux kernel 2.6.1 + +*) 2004-01-16 + +- added netkit-rsh package + +*) 2004-01-05 + +- updated libpng, vim +- updated zlib, removed obsolete patch +- updated tar, automake, autoconf + +*) 2004-01-04 + +- added tpconfig package + +*) 2003-12-31 + +- no "make symlinks" for tc-linux +- depmod fix and more linux fixes +- toolchain gcc version 3.3.2 +- updated linux.config for 2.6.0 +- several package updates + +*) 2003-12-29 + +- added vlc package +- fixed ffmpeg (dirty) to install libpostproc stuff +- added libmpeg2 package + +*) 2003-12-26 + +- updated transcode, removed obsolete buildfunctions for xvid +- fixed --(s)bindir change in bash and grep package +- adapted fstab file: shm -> tmpfs, added sysfs, + added /dev/pts (devfs no longer cares about pts!) +- added wmpower (another acpi/apm dockapp) +- added sysfs and udev directory to 00-dirtree package +- updated pcmcia-cs, disabled prism switch +- added module-init-tools + removed obsolete modutils +- updated to kernel 2.6.0 (more or less untested) + +*) 2003-12-04 + +- added avra package (avr assembler) + +*) 2003-12-03 + +- added sp12 package (avr atmel programmer) + +*) 2003-11-24 + +- updated to gcc 3.3.2 (untested) +- removed broken repository + +*) 2003-11-12 + +- added kernel patch for init/main.c for bussybox to work + +*) 2003-11-11 + +- downgraded ardour from cvs to 0.9beta8 + +*) 2003-11-08 + +- added ia32/bootdisk package (needs more testing!) + +*) 2003-11-07 + +- added raptor, liblrdf and libsamplerate +- build full ladspa sdk + +*) 2003-11-06 + +- added patch to fix getenv problem in libmustux + +*) 2003-11-04 + +- updated libmustux, protux (->cvs) +- added xaw_arrow_scrollbars patch for emacs (reported to emacs developers) + +*) 2003-11-02 + +- jack: run autogen.sh +- alsa: also build libs, utils, oss, tools +- disable printing for gimp +- no user-guide for gimp-print +- build tetex earlier in process + +*) 2003-11-02 + +- updated flite + +*) 2003-10-31 + +- updated wine (untested) +- updated magicfilter, added patch to not install cfmagic stuff +- updated lprng +- updated gpsd, patch to include stdarg.h instead of vararg.h + +*) 2003-10-30 + +- updated mozilla + some fixes +- iv updated, patch no longer needed, removed +- removed gimp-print patch +- updated cups + removed 2 makefile and makedefs patches +- changed buildorder of cups, gimp-print and gimp +- fontconfig needs expat <- added, again check buildorder! +- added fontconfig, so pango builds pangoft2 stuff (check buildorder!) +- added libart package, needed for gimp + +*) 2003-10-29 + +- also changed ffmpeg location for mplayer package (yes, it has own ffmpeg src) +- ffmpeg moved to mplayerhq.hu cvs + some fixes +- updated licq, added make variables +- xpdf: freetype 2 include preixed +- sed pathcing of gv config, patch added to not use preprocessor inc method +- downgraded gtk+1, like glib we need version 1.2.x + +*) 2003-10-28 + +- ettercap needs gtk+, new priority +- fixed isdn4k-utils +- acroread install more general now +- fixed xaw3d +- glib downgraded, for some reason we need version 1.2.x + +*) 2003-10-27 + +- updated sdl, removed patch +- updated and modified qt +- removed prefix patch from dlx, patched by sed now, new priority, needs tcltk +- updated xfree86 patches, fixed build procedure (cd before patching) +- checkpwd errno + makefile patch added +- xvid needs symlinks to colorspace includes in build dir +- set SED variable for libtool (lam libdvdcss) +- fixed prefix for libpng +- run aclocal & automake in lam package before building +- added extended flist_pruned for packages adding users +- removed openldap patch (not needed anymore) +- fixed portmap package (added patches) + +*) 2003-10-26 + +- removed ngrep patches +- fixed openh323 +- new priority for ettercap (gtk gui) +- small bugfix in hdw-get script +- using libpcap and tcpdump releases now +- changed pwlib build procedure +- removed pwlib patch +- named needs openssl, changed build priority +- dhcp: $root added to dymlink +- added www prfix for packages downloaded from hackdaworld +- different sbin path for modutils package +- updated hostap, fixed pcmcia-cs package + +*) 2003-10-25 + +- create_init: run determined by .init file name +- fixes in 00-init-conf, Build doesnt use init create function for this package +- removed some unnecessary backups of modified files +- fixed grpconv execution in 00-final-base-conf +- downgraded automake +- several package modifications +- shadow passwords extended to gpups, just set in none crossbuild + +*) 2003-10-21 + +- added patch for lphdisk as new compiler doest linke multi liter... ;) +- updated automake +- removed psmisc patch, added $root for specifying --exec-prefix +- new man patches and fixed confopt +- gettext needs auto*, changed priority +- fixed confopt for bash + post_install + +*) 2003-10-20 + +- nvi fixed (other version) + patches added (errno.patch from rocklinux) +- updated groff +- bugfixed coreutils symlinking +- nvi needs berkley db, changed priority + +*) 2003-10-19 + +- fixed glibc manpage build +- another glibc locking fix (grrrr ;) +- fixed findutils +- another glibc locking fix (troot for root="" case) +- fixed locking bug in glibc package +- some small changes in packages (mainly priorities) +- updated to tar alpha version, removed its patch +- use prefix for symlinks in groff package + +*) 2003-10-18 + +- updated hostname patch for coreutils +- added perl patch for stage 1 +- fixed ld.so.conf creation in glibc +- bugfixed coreutils package (only move binaries in stage 2) +- added the lfs proposed ncurses patches +- bugfixed gawks confopt +- dont remove libiberty.a from binutils, copy over its include +- removed own yacc creation in bison package +- new coreutils package needs moving of binaries to /bin +- new confopt for gawk, findutils + gawk patch +- minor fix to gcc configs post install work +- glibc package now does (re)adjusting to new linker in all stages +- priority changes in nvi, net-tools +- added zlib patch + fixed zlib package +- moved syslinux to stage 3 +- new entry in nsswitch.conf +- removed checkpwd from stage 2 + +*) 2003-10-17 + +- new 2.4.22 kernel default config +- 00-small-base-conf doing stage 1 work now (just some symlinks) +- removed wrong stage condition from linux package +- added perl to stage 1 +- install kernel manual pages +- use stage 1 symlink as a prefix for stage 1 builds +- stage 1 prefix symlinking moved to Build-Distro +- hdw_stage1_prefix variable added to Config +- using symlink method in necessary packages, really needed for all? (pls test!) +- variable stage1 prefix name adaptions + +*) 2003-10-16 + +- adapted/fixed other base packages (stage 1) +- removed glibc 2.2.x->2.3.x update hack: (toolchain solves this problem) + files: tar, kbd, glibc, 00-dirtree +- make_conf empty in stage 1, no more static builds +- changed patching of gcc config for using new dynamik linker + +*) 2003-10-15 + +- fixed reinstallation of ld compiled with new LIB_PATH +- fixed LIB_PATH when rebuilding ld (tc-binutils) +- skip tc-glibc for none crossbuilds +- introduced skip variable, Build will skip building package (eg: tc-glibc) +- added misc/crossbuild/fake_utsname/*, to possibly fake uts machine name + +*) 2003-10-14 + +- static rebuilding of ld (binutils) +- bugfix: --target included for crossbuilds now +- updated transcode package + +*) 2003-10-13 + +- removed sh-utils and textutils (replaced by coreutils) +- more packages updates +- updated openssl and openssh (i know i'm late ;) +- updated x11 repository (not tested, as of toolchin problems :/) +- remove debug line from Build script + +*) 2003-10-12 + +- improved build arch detection (coreutils changed uname output) +- include --target in confopt only for crossbuilds +- only set hdw_arch_prefix in crossbuild mode +- changed other base packages priority to fit in new buildorder +- some new crossbuild stuff in toolchain and base packages +- new toolchain order: linux, glibc headers, binutils, gcc + new base order: glibc, gcc, binutils +- removed obsolete create_cross_env execution from Build-Distro script + +*) 2003-10-11 + +- added hdw_real_build, see ./Config +- always set target specific hdw_arch_prefix + +*) 2003-10-10 + +- updated imagemagick + +*) 2003-10-08 + +- checkin of mhonarc changes done in the past (forgot it ;) +- added cvsd.init +- small changes in nut package concerning its config files + +*) 2003-10-07 + +- added nut package (network ups tools) + +*) 2003-09-30 + +- added emacs package + +*) 2003-09-27 + +- fixed/updated sendmail Makefile (virtusertable & clean target) + +*) 2003-09-21 + +- fixed xdirectfb package + +*) 2003-09-19 + +- added mhonarc package + +*) 2003-09-18 + +- added named package + +*) 2003-09-16 + +- added rcs and isdn4k-utils to router target +- packages fixes: lynx (flist pruned), automake (remove symlink first) +- added isdn4k-utils package +- added rcs package +- improved compression detection feature + +*) 2003-09-13 + +- added gcc patch to surpress libiberty build +- removed specs patch, patching done in gcc routine +- $root fixes for bash, gzip, textutils +- extended util-linux +- bugfix in tool-chain glibc +- bugfixed binutils, readded optimization to findutils, + coreutils, diffutils, glibc modified +- unset hdw_arch_prefix if build equals target system + +*) 2003-09-12 + +- corrected slibdir for base gcc build +- remove temp directory at end of tc-linux build +- added sys-include symlink for building gcc (needs headers) +- changed build priorities of several packages for correct tool-chain order +- optimization removed to old execute "place", + adapted tool-chain binutils and gcc package +- updatetd man package +- --host set to build host for tool-chain binutils and gcc +- removed dwop_shaped.patch, obsolete as updated to cvs directfb +- test change for gcc package +- adapted tool-chain packages to changes below +- disabled cerate_cross_env script, tool-chain packages should do the job +- Config returns target for acrh prefix (testing) +- optimization done after reading package config file (tc workaround) +- use --target= in confopt, even for native build + +*) 2003-09-11 + +- directfb now fetched from cvs +- fixed ffmpeg download location (cvs) +- directfb and xdirectfb fixes and patches added + +*) 2003-09-10 + +- internal make_tar.sh changed +- fixed (x)directfb stuff +- modified Download script, ssh cvs possible now (problem: key query) + +*) 2003-09-09 + +- added syslinux and tftp-hpa (supports tsize option) package + +*) 2003-09-08 + +- minimalist package fixed +- apache.init changed - stop still wrong + +*) 2003-09-06 + +- bugfix in tc-glibc + +*) 2003-09-05 + +- further tool-chain fixes, /static symlink on hostsystem +- added stage 1 specs patch for gcc, added glibc patch +- fixed srcdir in tc-* packages +- added general environment setting in scripts/Config +- glibc version update 2.3.2 (devel) +- important changes in binutils, gcc, glibc and linux package. + (adapted for toolchain way) +- added second prioity field for 2 stage packages +- added first tries of tool-chain packages +- 2 stage packages have seperated priorities now +- added tool-chain directory in packages. + tool-chains content is binutils, gcc, glibc and linux - prefixed with tc-. + download directories get linked to base packages. +- tool-chain added to all targets + +*) 2003-09-04 + +- faked confopt for pseudo crossbuilds stage 1 for coreutils +- forget about pseudo crossbuilds in stages > 1 +- added patches for man package +- modified scripts/Config, fixes hdw_arch_build +- updated alsa, reduced to driver build (temporaly) + +*) 2003-09-03 + +- added procmail package, included in router target + +*) 2003-09-02 + +- removed bison from stage 1 +- updated unrealircd, unrealircd now in router target +- updated apache, fixed man download location +- removed dlx and spim from router target +- updated devel, hackbard and net packages +- removed freeswan from router target (devel) +- added no fixincludes patch for gcc +- updated mplayer & directfb +- added coreutils package (replacing fileutils) + +*) 2003-09-01 + +- updated base and security packages +- downgraded glibc (2.3.1) temporaly + +*) 2003-08-25 + +- added/updated several packages + +*) 2003-07-28 + +- various package updates, dont remember doing them actually! %) + +*) 2003-07-08 + +- fixed cron package + +*) 2003-05-24 + +- added vtex package (still binary, look for src files!) + +*) 2003-05-22 + +- added acroread packge (binary -> /opt) + +*) 2003-05-01 + +- updated sendmail + +*) 2003-04-15 + +- added spim and dlx (risc mips emulators) + +*) 2003-04-05 + +- extended .setup feature +- added dfbpoint render patch, fvwm +- updated gcc + +*) 2003-04-04 + +- added setup feature for packages (example: unrealircd.setup) +- updated unrealircd download location +- added optional category to all-dev target + +*) 2003-03-24 + +- fixed tetex and unrealircd, last moved to opt repos + +*) 2003-03-19 + +- fixed priorities of ardour, libmustsux, protux, tutka +- added bridge-utils, libunicode + +*) 2003-03-18 + +- fixed xfree86 patches +- fixed lam confopt +- fixed mistake in wireless_tools + +*) 2003-03-17 + +- fixed jack priority, fixed minimalist (docdir) +- added ngrep patches (libpcap changes) +- copy libnet-config manually + +*) 2003-03-15 + +- fixed libnet +- updated to glibc-2.3.2 (untested) +- updated pcmcia-cs, hostap cvs -> release + +*) 2003-03-10 + +- added hdparm package +- fixed mplayer build (missing libavcodec dir) +- link libdvdread against libdvdcss + +*) 2003-03-04 + +- updated xfree86,tetex - untested! +- updated automake,file,parted,sendmail,texinfo - changed samba server + +*) 2003-03-03 + +- demian: removed pre_install from cvs +- added lphdisk + +*) 2003-03-01 + +- updated directfb, xdirectfb + +*) 2003-02-27 + +- updated directfb +- added licq package +- Build-Package pointing to log now + +*) 2003-02-24 + +- fixed trap error arguments +- modified transcode and mplayer package +- added liba52,libdvd{css,read},vobcopy,xvid package + +*) 2003-02-21 + +- demian: added depend all to make_conf of openldap +- removed obsolete abort_when_package_build_failed functions + +*) 2003-02-19 + +- added patch for ardour, still broken +- Build-Package -no_src_del added + +*) 2003-02-15 + +- added trap block around build procedures + +*) 2003-02-13 + +- modified target includes +- created soundtools repository, moved some packages there + +*) 2003-02-12 + +- added libmustux, protux, tutka package +- added umask command to Build script +- demian: added -e to echo command +- demian: exclude directories, but no empty directories in flist +- demian: hdw-get adaptions to new flist +- demian: added exit 1 to Build-Distro for *) case +- demian: changes/fixes to doc/BUILD +- demian: fixed apache (path value in apache.init) +- demian: fixed -list-broken for httpd servers in Download script +- demian: changes in tetex package, fixed pine, tcltk -> priority 4 + +*) 2003-02-08 + +- added detect_file_ending subrooutine +- faster compress check in Build script +- first implementation of -check-new for download + (not working properly yet) +- updated/fixed sevreal packages downloadlocations +- demian: fixed hdw_build_dir = 0 bug in scripts/Config + +*) 2003-02-06 + +- demian: fixed flist_cmd +- changed from switch to belnet sf server for some packages +- demian: xpdf confopt fixed + +*) 2003-02-05 + +- added 'exit 0' to nfsd init script + +*) 2003-02-04 + +- small fixes in doc/INSTALL +- mike: changes in sparc64 kernel config +- mike: changes in Config and Developers file +- improved/fixed Update-Tree script +- added parted package +- small fixes to hdw-get script + 00-copy-system-files +- fixed tetex package + +*) 2003-02-03 + +- fixed patch for gimp-print (removes docs from makefile) + +*) 2003-02-02 + +- added aclocal command to cvs and grep +- added chown commad to tetex for complete flist + +*) 2003-02-01 + +- added tetex package +- alsa moved to priority 10 (flite) +- updated pango, freetype, transcode +- mplayer without freetype support + +*) 2003-01-31 + +- added speex and samba package +- fix in create_init function + +*) 2003-01-30 + +- fixes in hdw-get.conf +- fixed orbit +- demian: fixed cron, moved nasm to ia32 repos +- added doc/INSTALL , small changes to doc/BUILD +- updated make, small changes in automake +- added PATH to xaw3d, root-tail and gv package +- changed TODO , small fixes in README + +*) 2003-01-29 + +- small fixes to glibc, tar package (glibc update hack) +- fixed alsa and moved to multimedia repos + +*) 2003-01-28 + +- small fix to Build-Package +- fixed cvsd package, added flist_pruned +- updated gnomemeeting, imagemagick and pine +- added screen, gv, xaw3d package +- updated openss{h,l} package +- demian: added official bash patches +- added flist_pruned to flistwrapper +- added special flist_path & flist_pruned to 00-dirtree package + +*) 2003-01-25 + +- added -nostdinc to CC and CXX variable in Build script +- fixed DESTDIR in dietlibc package +- added dietlibc patch for gcc package +- fixed g++ source extraction in gcc package +- changed init stuff from: netkit-base, apache, cron, cups, lprng, sendmail, + dhcp, portmap, rp-pppoe, openssh. +- updated gnomemeeting, pwlib, openh323 +- moved pwlib, openh323 back to net repos + +*) 2003-01-24 + +- fixed checkpwd package +- fixed kbd (glibc update hack) +- splitted final-base-conf in ~,copy-system-files,00-init-conf +- glibc hack implemented in 00-dirtree (glibc is build in chroot) +- added init files for minit +- added fgetty, checkpwd package +- added small wrapper to Build script for diet builds (devel) +- improved create_init function + +*) 2003-01-23 + +- added fefe target (dietlibc based) +- added create_init function to subroutines +- modified Build to use create_init (first tries - devel !) +- added minit package (dietlibc based init system) + +*) 2003-01-22 + +- added hdw_use_dietlibc option /Config,Puzzle,Helper) +- added diet repository, dietlibc package +- modified Build script to apply .dietlibc patches +- small fix in Create-Binary (hdw_arch_opt may not be defined) + +*) 2003-01-21 + +- added cdrtools package +- demian: changed flist behaviour +- demian: added chown -R in linux package (flist) + +*) 2003-01-20 + +- added main_c.patch for dfbsee to compile (thanks to Hunz) + +*) 2003-01-15 + +- removed lprng, magicfilter for desktop and mobile target +- added cups, ghostscript, magicfilter, gimp-print +- small fixes in gimp, lprng + +*) 2003-01-13 + +- added vim package (requested by users) +- fixed apmd to build, added makefile and apmsleep patch + +*) 2003-01-11 + +- added optional repository used for packages that are some kind of special. + (maybe use stage 4 here ?) +- added nvidia package to optinal repos. +- added dfbpoint, dfbsee and updated directfb +- modified router target + +*) 2003-01-07 + +- made crossglibc build (tested: ppc); cross gcc using new glibc still missing. +- added scummvm ;) + +*) 2003-01-05 + +- fixed cross_root in scripts/create_cross_env +- added missing '$' in scripts/Config. +- fixed package elftoaout. +- unset optimization flags in flite package. +- added lesstif, needed by xpdf. +- began implementing demians flist changes + fixed archdir in Build script. +- added scripts/adapt_local file, actually just a little help for me testing + new builds. + +*) 2003-01-04 + +- updated mixerapp and kbd package. + +*) 2002-12-30 + +- returned from congress -> added new packages xlockmore (safety), + root-tail (to be cool ;) +- small fix in create_cross_env script + +*) 2002-12-25 + +- added hdw-linux-0.3-dev repository ... here we go again ;) +- merry xmas :) + +* * +* hdw-linux-0.2 reelase, source: hdw-linux-0.2.0-dev * +* * + + +*) 2002-12-25 + +- fixed gcc to also build g++ extension in stage 2 +- added xinerama support for mozilla +- fixed flist bug in Build script +- hdw-get doesnt remove tmp directory. care for other sensative files? +- orbit fixed (depcomp file needed) +- updated autoconf, automake, mozilla, glib1 +- added cvsd, elftoaout, lprng, minimalist, pine, sendmail, wine, lam, gnuplot +- fixed rp-pppoe init script permissions +- rearranged targets, improved Helper script + +*) 2002-12-24 + +- added -show versions to Helper script +- added support for stage specific patches (.patch.) +- added gcc-g++ to gcc package - be careful when changing to cvs! +- temporaly freezed create_cross_env script for preparing bootstrap gcc +- added router and all-dev target +- added gcc no fixinclude patch +- added -O and -m optimization support + +*) 2002-12-23 + +- added patch for crssbuiding gcc for ppc +- removed latest introduced variables from Config script +- more changes to cross build system + +*) 2002-12-22 + +- (temporary) changes to Config script, introduced hdw_arch_build_prefix + variable. used in optimization script. +- some work commited on create_cross_env +- added ppc support in scripts/Config + +*) 2002-12-21 + +- fixed arch ia32 in linux package +- fixed bug in 00-small-base-conf +- moved misc/arch/intel -> ia32 +- fixed esound download location + +*) 2002-12-20 + +- added support to delete single package from chosen categories, + format: # [R] categorie/package (in target/*/include file) +- modified Puzzle & Helper script to include arch specific target + +*) 2002-12-19 + +- added ia32, ppc, sparc(64) repositories +- moved lilo, bin86 to ia32 target / targets wont build by now! +- fixed small bug in Helper script + +*) 2002-12-13 + +- added chmod to etc/init.d/dhcpd file +- added filter for package .out logs in Builds flistcreator +- added nfs-utils package, nfsd init script moved there +- fixed portmap pckage +- changed adsl-start location in init scripts, added exit 0 'dongl' +- added inetd stuff in netkit-base package + +*) 2002-12-07 + +- demian: improved patch system in Build script +- demian: cleanups for flistcreator +- demian: pointed to soem mistakes in flistcreator (missing dirs, fixed) + +*) 2002-12-06 + +- updated bin86, python, xpdf +- moved openmosixuerland to stage 4 +- added bc, curl, rarpd, ipcheck package + +*) 2002-11-30 + +- added hpc repository - high performance computing +- added openmosixuserland package + +*) 2002-11-29 + +- updated to linux 2.4.20, kernel .config still needs to get updated + +*) 2002-11-27 + +- removed linuxthreads manpages, groff not installed at that time +- updated apache, xpdf +- added building linxthreads manpages in glibc package +- added gpsd package +- downgraded groff to version 1.17.2, no escape chars in manpages anymore + +*) 2002-11-25 + +- added 2 ROCK patches to make telnet package compile +- moved alsa & unrealircd to broken repos +- added portmap, ftp, tftp and telnet package + +*) 2002-11-24 + +- added hdw-get 'download from web' support +- added misc/crossbuild directory for special adaptions +- changed intel to ia{32,64} +- begin {linux,gibc}-header build for cross builds +- s/return/exit/ in hdw-get + piped rmdir cmd to /dev/null +- reversed flist, so directories _may_ be empty using hdw-get remove +- using && operator in mozilla build - fails as of using old c++ headers +- look for glibc version, do nss hack for version 2.2.x +- added linux and glibc header builds in crossenv +- added isblank patch for iv +- improved Build-Package script +- fixed xawtv and iv package, dirty hacks! + +*) 2002-11-23 + +- fixed qt confopt +- fixed nvi, s/pre_install/build_main/ +- added export STRIP=--strip to rsync package +- added export AR="ar rc" for zlib package +- changed exit -> return in create_cross_env, hdw-get and Build-Package +- updated lilo, texinfo + fixed shadow download location +- updated binutils +- improved hdw-get (not that much ;) +- downgraded to gcc-3.2.1 +- added ./scripts/optimization, first opt. support +- added ./scripts/create_cross_env, first crossbuild support + +*) 2002-11-15 + +- using gnus binutils-2.13.1 now, donot use these from kernel.org + +*) 2002-11-14 + +- demian: added cron.d + hdw.daily script to cron package +- demian: var/adm* gets no longer searched by find cmd (flistcreator) +- changed flistcreator mechanism, still buggy. + +*) 2002-11-13 + +- removed gettext from stage 1 +- added GNU Public License +- updated BUILD howto (requirements) + +*) 2002-11-11 + +- ceduardo: added confopts to qt package + +*) 2002-11-9 + +- fixed Update-Tree scipt + +*) 2002-11-2 + +- added iv (image viewer), libxml2, imagemagick +- fixed Build-Package + +*) 2002-10-27 + +- updated sevreal packages download locations + +*) 2002-10-24 + +- demian: added -m flag to tar command + added abort... function +- demian: removed --login from chroot command in Build-Distro. + +*) 2002-10-21 + +- avifile changed to cvs package. + +*) 2002-10-20 + +- added sdl patch and send it to the author. + +*) 2002-10-19 + +- added pwlib c++ patch again, sent to maintainers. + +*) 2002-10-18 + +- updated ncurses, openh323, pwlib + +*) 2002-10-13 + +- fixed find command (flist creator), thanks to demian +- fixed openh323 package + +*) 2002-10-12 + +- added pwlib patch for c++ strstream problem (ncurses was the same) +- added path apply for openh323 too +- added pcmcia-cs printk bug patch +- using exit 0 in hdw-get now +- improved patch system, to apply target and architecture specific patches +- updated nvi, removed former patches +- moved bdb from hackbard repository to base +- added code to mv libnss stuff back to /lib after tar has compiled +- updated procps, removed procps patch +- added psmisc fprintf bug, strange cvs gcc behaviour + +*) 2002-10-11 + +- updated to glibc-2.3.1 +- added procps patch +- added whoami alias to sh-utils to build su binary +- tar gets build earlier to be able to move libnss stuff back! + +*) 2002-10-10 + +- flex compiles in stage 1 now too, needed for cvs gcc +- added ncurses patch to properly compile c++ part, + includes located in /usr/include/c++/3.3/backward with cvs gcc +- modified groff package to not use netpbm binaries for install +- fixed a fprintf bug in man package (added patch) + modified config file +- added sh-utils hostname patch + +*) 2002-10-09 + +- gcc is from cvs now; removed gcc-3.2 compat patch. +- textutils downgraded again. +- cvs downloads use -z 9 now. +- gettext and bison added to stage 1, as cvs gcc needs them installed. + +*) 2002-10-04 + +- added gcc patch to compile with glibc-2.3 (compat stuff) +- move libnss_{compat,files}* out of lib dir. segfault problem. + +*) 2002-10-03 + +- updated base packages +- updated to glibc-2.3 +- fixed some gnome x11 download locations + +*) 2002-10-01 + +- fixed xawtv download location + +*) 2002-09-30 + +- added xawtv package + +*) 2002-09-24 + +- d3mian: added -prune dev and proc to find command +- d3mian: added gcc-build dir check before creating it +- modified openh323 and gnomemeeting for testing reasons + +*) 2002-09-23 + +- updated mplayer win32 codecs +- added esound, orbit, audiofile package +- changed some buildorders + +*) 2002-09-21 + +- added first version of scripts/Build-Package script +- added -root option to scripts/Create-Binary + +*) 2002-09-20 + +- d3mian: improved Download script (+ more modifications following tommorrow) +- fixed minicom and unrealircd syntax errors + +*) 2002-09-15 + +- added broken repository for not yet ready packages (moved openobex* there) +- added bdb, imlib package + +*) 2002-09-14 + +- added openldap (feel free to take over maintainance!) +- added openh323, pwlib, gnomemeeting, ldap package +- fixed anjuta priority + added gnome-libs +- added minicom, rsync package + +*) 2002-09-13 + +- added sersniff package + +*) 2002-09-12 + +- added nmap package (from pots bits *g) +- modified libmpeg to copy over include files + +*) 2002-09-11 + +- added libflashplugin to mozilla build -> still unresolved symbols! +- added --enable-__cxa_atexit option to gcc's configure +- added transcode, wvstreams and wvdial package + +*) 2002-09-10 + +- added cron package + +*) 2002-09-09 + +- added gnokii package + +*) 2002-09-04 + +- added flite package + +*) 2002-09-03 + +- added locale settings to 00-final-base-conf package +- added hdw-linux-0.2-dev repository! -- have fun, improve that shit :) -- + +* * +* hdw-linux-0.1 reelase, source: hdw-linux-0.1.0-dev * +* * + + +*) 2002-09-02 + +- Hackbard: releases hdw-linux-0.1 +- Hackbard: changed README and BUILD howto, deleted patch from grep +- Hackbard: modified target desktop to finish whole build + +*) 2002-09-01 + +- Hackbard: added sparc and sparc64 support in scripts/Config *hardcore devel* +- Hackbard: delted [P] tags from configfiles +- Hackbard: added ettercap and anjuta +- Hackbard: moved packages configs to subfolders +- Hackbard: added apply patch from confdir directory automatically +- Hackbard: added archdir -> download file, confdir -> package configdir + +*) 2002-08-31 + +- Hackbard: added gdb, apache, unrealircd, alsa, ppp, rp-pppoe, sudo +- Hackbard: improved Create-Binary script +- Hackbard: added -list-unknown, remove-unknown feature in download script +- Hackbard: fixed mplayer, moved t1lib + xpfd -> x11 repository +- Hackbard: introduced first version of ./scripts/Create-Binary + +*) 2002-08-30 + +- Hackbard: fixed small bug in download script +- Hackbard: added t1lib, xpdf, libogg and libvorbis +- Hackbard: included libavcodec to mplayer + support for opendivx +- Hackbard: finaly got ethereal to build from cvs snapshot (autoconf prob) +- Hackbard: added python, tcltk, lame +- Hackbard: added dhcpd package + +*) 2002-08-29 + +- Hackbard: fixed pcmcia-cs init stuff +- Hackbard: improved Update-Tree to search for existing packages +- Hackbard: added gimp package +- Hackbard: fixed openssh init and keygeneration + +*) 2002-08-28 + +- Hackbard: added cvs base packge + bind to desktop target +- Hackbard: fixed permissions on etc/ files +- Hackbard: added mixer.app + +*) 2002-08-27 + +- Hackbard: added tcpdump package +- Hackbard: removed Create-Diff and patch.pl - we stay with bash + (patches against cvs doesnt make sence imho) +- Hackbard: changed buildorder - ethereal last package of desktop target now +- Miguel: Updated Developers file, as i got 1/2 a bit more involved :) +- Miguel: Edited Config file as we now have sparc64 port. +- Miguel: Added sparc64 port, created misc/arch/sparc64 and made linux.config +- Miguel: Added Create-Diff and patch.pl now we have a hdw patch making script apply them with patch -Nfp1 < patch. +- Hackbard: save & restore build_order files added to Build-Distro +- Hackbard: merged d3mian's -list-broken work to Download script + (thanks to jonathan) + +*) 2002-08-26 + +- Miguel: Fixed typo on [D] flag of packages/base/perl file, thanks to d3mian for reporting the bug. +- Miguel: Downgraded from 2.0.39 to 1.3.26, 2.0 is not ready enought for a + real production enviroment. +- Miguel: Added Firewall target, check tagets/firewall/include, edited Config + file to include the firewall target, now its a matter of adding + packages. +- Hackbard: severla small fixes to the package config files +- Hackbard: added libidl1 for mozilla to build +- Miguel: added some lines to subroutines to make ascii colors work. +- Miguel: improved Build-Distro script it now has ascii colors in the output. +- Hackbard: fixed wm* dock applets + +*) 2002-08-25 + +- Hackbard: added wireless support in std kernel to properly build pcmcia-cs +- Hackbard: added mozilla + libidl +- Hackbard: added pcmcia-cs, divx4linux, mplayer, ethereal, libnet, libpcap, + wireless_tools, wmapm, wmifs, wmitime, wmmon, wmwave, wterm, xmms +- Hackbard: fixed localstatdir and sysconfdir in Build +- Hackbard: tried to add cvs passwd needed checkouts +- Hackbard: added multimedia repository, moved packages from x11 there +- Hackbard: added (un)zip, aalib +- Hackbard: removed ext repository +- Hackbard: added -no_cvs to Download script +- Hackbard: added gtk+1, sdl and fixed bug in download script +- Hackbard: improved flist creator and hdw-get script +- Hackbard: added libflash patch to know about sqrt +- Hackbard: fixes for directfb and avifile, still broken +- Hackbard: Build runs ldconfig before builds now, stage > 1 +- Hackbard: added aeolus wlan sniffer package for cvs feature testing +- Hackbard: added cvs support in Download script +- Hackbard: fixed bug in Download, trying to get files more then 1 time + +*) 2002-08-23 -- ouh %) .. the 23's, good time to die! + +- Hackbard: added fbset, directfb, avifile, libflash, libmpeg3, qt +- Hackbard: smll fixes in 00-final-base-conf +- Hackbard: shadow package now moves login & su to /bin +- Hackbard: added hdw-get to /usr/bin +- Hackbard: applied list patches and improved 00-final-base-conf + +*) 2002-08-22 + +- Hackbard: added /etc/conf/bootdown and btee file from ROCK Linux +- Hackbard: added dircolors and profile to /etc files +- Hackbard: added notes when copied from ROCK Linux +- Hackbard: moved priorities from gtk based stuff and added glib1 package + +*) 2002-08-21 + +- Hackbard: added: irssi, atk, freetype, glib, gtk+, libjpeg, libtiff, libungif, + libungiff, pango, pkgconfig package +- Hackbard: moved net/apache -> mike/apache ;) +- Miguel: Updated iptraf version from 2.5.0 to 2.7.0 +- Miguel: removed apache from ext, it is already in net category. +- Hackbard: added libpng package to x11 repository +- Hackbard: added -no_src_del to Build-Distro and Build option, good for big + packages failing not needed to compile from scratch! +- Hackbard: added misc/hdw-tools/hdw-get; binary package manager - + by now just supports remove option +- Hackbard: added windowmaker to x11 repos +- Hackbard: fixed bzip2 package +- Hackbard: added srcdir variable to Build, use it in packages config files + +*) 2002-08-20 + +- Hackbard: moved Syscheck to syscheck; (script is not intended to get executed + manually by the user) + added author tag and hdw header +- Miguel: added color subroutines. +- Miguel: added Syscheck script. +- Miguel: Improved Build-Distro script to also run Syscheck. +- Hackbard: added warn_beep to subroutines and abort function +- Hackbard: added xfree86 package +- Hackbard: modified packages to deal with new confopt +- Hackbard: piped find's proc output to /dev/null +- Hackbard: improved confopt, packages installed bullshit before :) + +*) 2002-08-19 + +- Hackbard: added scripts/Update-Tree that by now updates the packages/targets + files from hdw-repos which is contributed to by the world :) +- Hackbard: changed Download mirror location +- Hackbard: added misc/internal/make_tar.sh script to easiyl create + tarballs and upload them to my server +- Hackbard: updated openss{l,h}, iptables and hackbard/* stuff +- Hackbard: introduced new target desktop - go, build it :) +- Hackbard: improved Puzzle script to also fetch single packages +- Hackbard: moved network repos to net +- Hackbard: openss* -> security repository +- Hackbard: added security repository +- Hackbard: fixed break function in Build-Distro +- Hackbard: fixed flist creator + +*) 2002-08-18 + +- Hackbard: added flist creator mechanism to Build script, + needs to get improved! +- Hackbard: movrd ncurses and texinfo to stage2 - does that work? +- Hackbard: added desktop target, need more x11 packages +- Hackbard: added scripts/Helper script, creates the buildorder right now +- Hackbard: made Build-Distro script read the buildorder file by Helper script + (single chosen pachages in target possible now!) +- Hackbard: moved ncurses and texinfo to stage2 +- Hackbard: updated to gcc-3.2 +- Hackbard: build_main executes ./configure only if available now +- Hackbard: README, BUILD get lnked now +- Hackbard: fixed bzip2 package +- Hackbard: added stage4 for builds on running system, + stage3 left for additional packages for other targets +- Hackbard: added abort functions in build_main +- Hackbard: added several config files for /etc +- Hackbard: added 00-final-base-conf package +- Hackbard: fixed less, nvi and net-tools + +*) 2002-08-17 + +- Hackbard: added termcap lib +- Hackbard: removed wget from ext, added wegt to base +- Hackbard: modified linux package and added new linux.conf +- Hackbard: improved BUILD howto +- Hackbard: changed more buildorders + +*) 2002-08-16 + +- Hackbard: added nasm package for lilo +- Hackbard: modified Build script (buildenv output) +- Hackbard: changed doc/* files +- Hackbard: changed buildorder of all packages + +*) 2002-08-15 + +- Hackbard: gcc -> buildorder 2 +- hackbard: added package zlib, buildorder 2 +- Hackbard: added rm of old hdw-linux sources in Build-Distro +- Hackbard: cleaned up ./misc folder +- Hackbard: added misc/sysfiles folder + etc/group and etc/passwd file +- Hackbard: added 00-small-base-conf package which copies sysfiles +- Hackbard: wrote glibc patch to compile with gcc-3.1.1, + weak declaration of `_old_sys_nerr' must precede definition +- Hackbard: changed optimization implementation, thnx to jonathan! + and rocklinux aka clifford wolf ofcourse :) +- Hackbard: added linux to stage 1 +- Hackbard: sorted and changed doc/TODO list +- Hackbard: added hdw_debug_buildenv feature ( ./Config ) +- Hackbard: wrote patch for grep, didnt work -> downgrade +- Hackbard: downgraded textutils, cat was segfaulting +- Hackbard: changed output from Build and Build-Distro +- Hackbard: improved abort_when_package_failed function from subroutines + +*) 2002-08-14 + +- Hackbard: fixed bash, deleted --with-ncurses +- Hackbard: added start time at build start of package +- Hackbard: added rm -rf src.$package line in Build script +- Hackbard: fixed glibc, thanks to hioki aka carlos + +*) 2002-08-13 + +- Hackbard: updated base packages and moved some packages in other + categories +- Miguel: added network, mike, hackbard and x11 categorie and moved + packages + +*) 2002-07-05 + +- Hackbard: changed bash stage1 to create symlinks and remove them before + building bash stage2 +- Hackbard: removed ltrace patch, not used +- Hackbard: fixed glibc package config +- Hackbard: added chmod 700 sccripts/Build-Distro to doc/BUILD + +*) 2002-07-04 + +- Hackbard: added strace and ltrace package to base, though ltrace segfaults +- Hackbard: some debugging cleanups +- Hackbard: changed grep package again, to find out about segfaulting + +*) 2002-06-30 + +- Hackbard: completed stage 1 build, util-linux was missing. +- Hackbard: fixed wget download locations. +- Hackbard: changed installation prefix of stage 1 to $root/static. +- Hackbard: minor changes to the scripts. + +*) 2002-06-28 + +- Hackbard: added scripts/subroutines. +- Hackbard: introduced abort ehrn package fails feature. +- Hackbard: improved and fixed scripts. + +*) 2002-06-25 + +- Hackbard: several bugfixes in the core scriptsi. + linux package (kernel) wont build by now! reason known of course. +- Hackbard: updated ext packages so they get at least downloaded +- Hackbard: improved Download script to use earlier introduced list option. + +*) 2002-06-24 + +- Hackbard: added -list-missing option to Download script. +- Hackbard: added -chroot option to Build-Distro for stages 2 and 3. +- Hackbard: updated package base configs. +- Hackbard: created Build-Distro which now replaces Build -target. +- Hackbard: Build behaviour changed, added options -stage. +- Hackbard: changed config files, we now have stages and priorities in there: + # [S] stagelevels(1-3) priority(1-100) +- Hackbard: changed TODO file !! READ IT !! + +*) 2002-06-23 + +- Hackbard: Puzzle script now supports multiple files per package +- Hackbard: changed package config files + +*) 2002-02-20 + +- Miguel: Modified autoconf, automake, bin86, bind, devfsd, eject, + findutils, flex, gettext, groff, joe, kbd, less, libtool, + lilo, m4, man, man-pages, modutils, sysklogd packages so + they can now be Build ... GO AHEAD BUILD THEM!! +- Miguel: Updated doc/ Developers, TODO and README files. + +*) 2002-02-16 + +- Hackbard: added 00-dirtree package and fixed fileutils package. +- Hackbard: added short doc/BUILD howto for the impatient. + +*) 2002-02-15 + +- Hackbard: ./scripts/Build target working for the pre system now. + fixed redirecting of stderr, fixed some build functions. +- Stonefly: fixed definition of $compress for tar. + +*) 2002-02-13 + +- Hackbard: ./scripts/Build -package working now. pre packages copied to + base packages folder. edited pre packages to work with build + script. (pls be still carefull using build script) + +*) 2002-02-12 + +- Hackbard: worked out minimal (not finished yet) Build -package command. + +*) 2002-02-11 + +- Miguel: Chaged TODO, README and Developers files. +- Miguel: Updated pre and base packages Versions. +- Miguel: Successfully changed all pre and base packages to ext style. +- Miguel: Finished setting up master mirror with pre and base packages. +- Miguel: Added pre/ dir to download/ dir. + +*) 2002-02-10 + +- Hackbard: works on build script. added autoextract function. + -- + warning: do not use build script from that day on! it may damage + ur system! + -- + +*) 2002-02-09 + +- Hackbard: changed download - use http.../ now as a mirror. +- Miguel: added mirror on http://www.hack-solutions.com/hdw-linux +- Hackbard: modified download script to append hdw-linux-(ver)/(categorie) + to downloadlocation. +- Hackbrad: restudied build scripts. began rewriting bash package. +- Hackbard: moved packages needed for chroot to pre category. +- Hackbard: prepared Puzzle and Download script, we now support mirrors. + +*) 2002-02-07 + +- Hackbard: first attempts to go for targets! build still not working. + +*) 2002-02-06 + +- Miguel: Added apache, bind, eject, iptraf, iptable, joe and linux packages. +- Miguel: Made some small changes on ./scripts/Download +- Miguel: Added a part of the new Build script. + +*) 2002-02-05 + +- Miguel: Updated all base packages. +- Miguel: Moved nmap extension to base packages + +*) 2002-01-11 + +- Hackbard: Added ./scripts/Puzzle, which by now creates the PKGS files. + This just effects the ext's by now as base needs to get converted. +- Hackbard: Removed pre directory from packages folder. +- Hackbard: Improved ./scripts/Download to work with Puzzle script. +- Miguel: Added nmap extension package. + +*) 2002-01-10 + +- Miguel: Added finised new README file, removed README.cvs and REAME.old +- Miguel: Made several changes to scripts/Download, removed scripts/download +- Miguel: Replaced TODO list for a new one. +- Miguel: Added dirs base and ext to download/ and added download/base/PKGS + +*) 2002-01-09 + +- Miguel: Linked VERSION with doc/VERSION. +- Miguel: Added doc/Developers. +- Miguel: Removed logs/ dir. +- Miguel: Fixed scripts/Download to work with the new download/ dir. +- Miguel: Moved doc/README to doc/README.old and added the first part of the new README. + +*) 2002-01-08 + +- Miguel: Created scripts/ directory and moved all the script in it. +- Miguel: Removed install.sh scripts. +- Miguel: Added CHANGELOG to doc/ dir +- Hackbard: Created download/ targets/ packages/ +- Hackbard: Replaced base-config ext-config and pre-config for packages/base, packages/ext and packages/pre +- Hackbard: Added doc/README.cvs + diff --git a/doc/Developers b/doc/Developers new file mode 100644 index 0000000..c8fdb72 --- /dev/null +++ b/doc/Developers @@ -0,0 +1,13 @@ +HDW-Linux Devlopers +-------------------- + +N: Frank Zirkelbach +E: hackbard@hackdaworld.dyndns.org +W: http://hackdaworld.dyndns.org +F: Team Leader, Webpage, Extension Packages, Core Scripts. + +N: Jonathan J. Vargas Rodriguez +E: demian@hackdaworld.dyndns.org +W: http://hackdaworld.dyndns.org/~demian/ +F: Just filling space around here +A: demian diff --git a/doc/INSTALL b/doc/INSTALL new file mode 100644 index 0000000..9827d25 --- /dev/null +++ b/doc/INSTALL @@ -0,0 +1,139 @@ +# hdw - linux INSTALL file + +this is a short introduction on how to install hdw-linux. you should have build +your hdw distro already or at least have the hdw-linux sources installed to use +the hdw-get script to install from precompiled binaries. +it is supposed to work at least for me. though this is dev and may hurt your +baby, be warned. i mean it! + +there are two possibilities for installation. the first one assumes you have +build your hdw distro and are ready to rock. the second assumes that you have +created/got the binarie tarballs and want to install them using hdw-get. mention +that hdw-get may fetch the binaries from a http/ftp server too. i keep trying to +offer the binaries of the latest hdw development version on my site. +the third step explains how to configure your installed system and make it ready +to rboot. + +here we go ... + +1. way - hdw-distro ready to rock +--------------------------------- + +in case your hdw-build directory alreday has been mounted on a seperated +partition you may skip the following and read on at chapter 'final steps'. +otherwise copy over the hdw system to your target partition. + + example: + + mke2fs + mount /mnt/hdw-target + + umount $hdw_build_dir/dev + umount $hdw_build_dir/proc + cp -a $hdw_build_dir/* /mnt/hdw-target + +(where /mnt/hdw-target is the mountpoint the target partition was mounted to) + +2. way - hdw-get +---------------- + +if you didnt build and create the hdw distro by your own, make sure you have the +hdw-get script present which can be found in the hdw-linux sources. the way of +installation differs whether you have the binaries on your host or if you want +to download them via network/internet. + + binaries exist on local host + ---------------------------- + in that case just do the following: + + example: + + mke2fs + mount /mnt/hdw-target + (feel free to create more partitions, e.g. for usr, var and stuff) + + for i in /point/to/binaries/*/*.tar.bz2; do + hdw-get install /mnt/hdw-target $i + done + + binaries from network/internet + ------------------------------ + if you want to fetch them from the internet you need to configure + hdw-get. after that you are able to download the binaries which get + installed afterwards. please notice that there is currently just 586 + optimized binaries on my server. feel free to add mirrors and contact + me. + as we dont have the sources on our local computer we need Helper script + to figure out what we are going to install (also available in the hdw + sources) + you will need wget installed for hdw-get to work! + + example: + + cat > /etc/hdw-get.conf << EOF + net_addr="http://hackdaworld.dyndns.org/download" + # note that there doesnt exist binaries of all versions/archs + hdw_version="0.3-dev" + hdw_arch="ia32" ; hdw_arch_opt="i586" + EOF + + . misc/hdw-tools/hdw-get install /mnt/hdw-target 00-dirtree + for i in 2 3; do + ./scripts/Helper -show buildorder $i | grep -v '^#' >> foobar + done + cat foobar | while read a b c; do + . misc/hdw-tools/hdw-get install /mnt/hdw-target $c + done + + +final steps +----------- + +chroot to your new build system and compile a new kernel (default optimized for +pentiumII) + + example: + + chroot /mnt/hdw-target /bin/bash \ + PATH="/sbin:/bin:/usr/sbin:/usr/bin" --login + cd /usr/src/linux + make menuconfig + (make sure to always enable devfs support!) + make dep bzImage modules modules_install + +yo may want to set a root password. + + example: + + passwd + (type your password, yes, type it 2 times :) + +leave the chroot (beside you are not installing from rescue disks) and make the +kernel bootable. + + example: + + exit + cp /mnt/hdw-target/usr/src/linux/arch/i386/boot/bzImage \ + /boot/vmlinuz_hdw + vi /etc/lilo.conf + (add vmlinuz_hdw + lilo + +have a look at the config files in /mnt/hdw-target/etc/* and adjust to your +needs. reboot then - good luck! ;) + + example: + + init 6 + + +troubleshooting: +---------------- + +- visit: irc.hackdaworld.dyndns.org, #hackdaworld +- visit: http://www.hackdaworld.dyndns.org/contents/mailing-list/ +- visit: www.linuxfromscratch.org, www.linuxdoc.org, www.rocklinux.org ;) + + +regards hackbard diff --git a/doc/License b/doc/License new file mode 100644 index 0000000..dc63aac --- /dev/null +++ b/doc/License @@ -0,0 +1,340 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/doc/README b/doc/README new file mode 100644 index 0000000..31b487a --- /dev/null +++ b/doc/README @@ -0,0 +1,71 @@ + +Welcome to hdw - linux +---------------------- + +HDW - Linux is not just another Linux distribution, it is a Distribution +Building Tool, made of some powerfull scripts that make the whole +download, build and install procedures very simple... even for newbies. +Base packages are specially focused on networking, security and development +which is really convinient for intermidiate / advanced users, but without +forgetting about packages like XFree86, games, multimedia and office, so +it's a distribution for Users and Administrators :) + +Files in doc/ directory. +------------------------ + +README - explains some general things and how to obtain the sources +BUILD - instructions how to build hdw-linux (you want to read this!) +TODO - developer's todo list +CHANGELOG - changes made to the hdw-linux tree +Developers - file keeping all the hdw-linux developers +VERSION - containing the current version number +License - the GPL -- GNU Public License + +Getting hdw - linux +------------------- + +To get the hdw-linux sources you have two ways: + +- Download it from our website: + +http://hackdaworld.dyndns.org + +Stable tree: + +The tarballs: +http://www.hackdaworld.dyndns.org/download/hdw-linux/hdw-linux-0.2/snapshots/ + +Get it using cvs: +cvs -d :pserver:anonymous@hackdaworld.dyndns.org:/hdw-linux login +cvs -d :pserver:anonymous@hackdaworld.dyndns.org:/hdw-linux co hdw-linux-0.2 + +Development tree: + +The tarballs: +http://www.hackdaworld.dyndns.org/download/hdw-linux/hdw-linux-0.3-dev/snapshots/ + +Get it using cvs: +cvs -d :pserver:anonymous@hackdaworld.dyndns.org:/hdw-linux login +cvs -d :pserver:anonymous@hackdaworld.dyndns.org:/hdw-linux co hdw-linux-0.3-dev + +You may also fetch the sources from a mirror: + + + +If you want to add a mirror, please send an email to mike@hackdaworld.dyndns.org or hackbard@hackdaworld.dyndns.org. + +hdw - linux Community +--------------------- + +We have an IRC server, so you can join our channel and get help online, or just talk with other users. + +irc server: hackdaworld.dyndns.org +channel: #hackdaworld + +Also we have a mailing list, to join it, send an email to +minimalist@hackdaworld.dyndns.org with the Subject: subscribe hackdaworld + +We hope to hear from you soon. + +hdw - linux Staff + diff --git a/doc/VERSION b/doc/VERSION new file mode 100644 index 0000000..41b364d --- /dev/null +++ b/doc/VERSION @@ -0,0 +1 @@ +hdw-linux-cvs diff --git a/misc/arch/ia32/busybox.config b/misc/arch/ia32/busybox.config new file mode 100644 index 0000000..f5aa834 --- /dev/null +++ b/misc/arch/ia32/busybox.config @@ -0,0 +1,427 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +CONFIG_LOCALE_SUPPORT=y +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +CONFIG_STATIC=y +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +# CONFIG_AR is not set +CONFIG_BUNZIP2=y +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_GUNZIP is not set +# CONFIG_GZIP is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +# CONFIG_FEATURE_TAR_EXCLUDE is not set +# CONFIG_FEATURE_TAR_GZIP is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNZIP is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_EXPR is not set +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_LENGTH is not set +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +# CONFIG_FEATURE_LS_RECURSIVE is not set +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_MD5SUM is not set +CONFIG_MKDIR=y +# CONFIG_MKFIFO is not set +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_OD is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +# CONFIG_FEATURE_SORT_REVERSE is not set +# CONFIG_FEATURE_SORT_UNIQUE is not set +# CONFIG_STTY is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +# CONFIG_FEATURE_FANCY_TAIL is not set +# CONFIG_TEE is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +CONFIG_TOUCH=y +# CONFIG_TR is not set +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +# CONFIG_WATCH is not set +# CONFIG_WC is not set +# CONFIG_WHO is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_LOADACM is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +# CONFIG_MKTEMP is not set +# CONFIG_READLINK is not set +# CONFIG_RUN_PARTS is not set +# CONFIG_START_STOP_DAEMON is not set +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +# CONFIG_FEATURE_FIND_MTIME is not set +# CONFIG_FEATURE_FIND_PERM is not set +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_GREP=y +# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +# CONFIG_FEATURE_GREP_CONTEXT is not set +# CONFIG_XARGS is not set + +# +# Init Utilities +# +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_INITRD=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +CONFIG_HALT=y +CONFIG_POWEROFF=y +CONFIG_REBOOT=y +CONFIG_MESG=y + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +CONFIG_ADDGROUP=y +CONFIG_DELGROUP=y +CONFIG_ADDUSER=y +CONFIG_DELUSER=y +CONFIG_GETTY=y +CONFIG_LOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Common options for adduser, deluser, login, su +# +CONFIG_FEATURE_SHADOWPASSWDS=y + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +# CONFIG_DC is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_STRINGS is not set +# CONFIG_TIME is not set +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +# CONFIG_FEATURE_OLD_MODULE_INTERFACE is not set +CONFIG_FEATURE_NEW_MODULE_INTERFACE=y + +# +# Support new (post 2.1) Linux kernels (Forced enabled) +# +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +CONFIG_LSMOD=y +CONFIG_FEATURE_QUERY_MODULE_INTERFACE=y +CONFIG_MODPROBE=y +CONFIG_RMMOD=y +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y + +# +# Networking Utilities +# +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_ARPING is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +# CONFIG_IFUPDOWN is not set +# CONFIG_INETD is not set +# CONFIG_IP is not set +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +# CONFIG_NC is not set +# CONFIG_NETSTAT is not set +# CONFIG_NSLOOKUP is not set +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_ROUTE=y +# CONFIG_TELNET is not set +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +# CONFIG_TRACEROUTE is not set +# CONFIG_VCONFIG is not set +# CONFIG_WGET is not set + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +# CONFIG_UDHCPC is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +# CONFIG_PIDOF is not set +CONFIG_PS=y +# CONFIG_RENICE is not set +# CONFIG_TOP is not set +CONFIG_UPTIME=y + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_GETOPTS is not set +# CONFIG_ASH_CMDCMD is not set +CONFIG_ASH_MAIL=y +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_COMMAND_EDITING=y +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_COMMAND_HISTORY=15 +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +# CONFIG_FEATURE_SH_FANCY_PROMPT is not set +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +# CONFIG_HEXDUMP is not set +# CONFIG_HWCLOCK is not set +# CONFIG_LOSETUP is not set +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +# CONFIG_SWAPONOFF is not set +CONFIG_MOUNT=y +# CONFIG_NFSMOUNT is not set +CONFIG_UMOUNT=y +# CONFIG_FEATURE_MOUNT_FORCE is not set + +# +# Common options for mount/umount +# +# CONFIG_FEATURE_MOUNT_LOOP is not set +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/misc/arch/ia32/linux.config b/misc/arch/ia32/linux.config new file mode 100644 index 0000000..9a356ca --- /dev/null +++ b/misc/arch/ia32/linux.config @@ -0,0 +1,1107 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_X86=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_GENERIC_ISA_DMA=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_CLEAN_COMPILE is not set +# CONFIG_STANDALONE is not set +CONFIG_BROKEN=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Processor type and features +# +CONFIG_X86_PC=y +# CONFIG_X86_ELAN is not set +# CONFIG_X86_VOYAGER is not set +# CONFIG_X86_NUMAQ is not set +# CONFIG_X86_SUMMIT is not set +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_VISWS is not set +# CONFIG_X86_GENERICARCH is not set +# CONFIG_X86_ES7000 is not set +CONFIG_M386=y +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +# CONFIG_M686 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP2 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +CONFIG_X86_GENERIC=y +CONFIG_X86_L1_CACHE_SHIFT=7 +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_F00F_BUG=y +CONFIG_X86_INTEL_USERCOPY=y +# CONFIG_HPET_TIMER is not set +# CONFIG_HPET_EMULATE_RTC is not set +# CONFIG_SMP is not set +CONFIG_PREEMPT=y +# CONFIG_X86_UP_APIC is not set +CONFIG_X86_MCE=y +CONFIG_X86_MCE_NONFATAL=y +# CONFIG_TOSHIBA is not set +# CONFIG_I8K is not set +# CONFIG_MICROCODE is not set +# CONFIG_X86_MSR is not set +# CONFIG_X86_CPUID is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +# CONFIG_REGPARM is not set + +# +# Power management options (ACPI, APM) +# +# CONFIG_PM is not set + +# +# ACPI (Advanced Configuration and Power Interface) Support +# +# CONFIG_ACPI is not set +CONFIG_ACPI_BOOT=y + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y +CONFIG_ISA=y +# CONFIG_EISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set + +# +# PCMCIA/CardBus support +# +CONFIG_PCMCIA=y +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_YENTA is not set +# CONFIG_I82092 is not set +# CONFIG_I82365 is not set +# CONFIG_TCIC is not set +CONFIG_PCMCIA_PROBE=y + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_MISC=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +CONFIG_PNP=y +# CONFIG_PNP_DEBUG is not set + +# +# Protocols +# +CONFIG_ISAPNP=y +CONFIG_PNPBIOS=y +# CONFIG_PNPBIOS_PROC_FS is not set + +# +# Block devices +# +CONFIG_BLK_DEV_FD=y +# CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=y +CONFIG_BLK_DEV_NBD=y +# CONFIG_BLK_DEV_CARMEL is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +CONFIG_LBD=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_HD_IDE is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +# CONFIG_BLK_DEV_IDECS is not set +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set +CONFIG_IDE_TASKFILE_IO=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_CMD640=y +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +# CONFIG_BLK_DEV_IDEPNP is not set +CONFIG_BLK_DEV_IDEPCI=y +CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=y +# CONFIG_BLK_DEV_OPTI621 is not set +CONFIG_BLK_DEV_RZ1000=y +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +CONFIG_BLK_DEV_ADMA=y +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_BLK_DEV_ATIIXP is not set +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +CONFIG_BLK_DEV_PIIX=y +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SIS5513 is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=y +# CONFIG_SCSI_FC_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +CONFIG_SCSI_AIC7XXX_OLD=y +CONFIG_SCSI_AIC79XX=y +CONFIG_AIC79XX_CMDS_PER_DEVICE=32 +CONFIG_AIC79XX_RESET_DELAY_MS=15000 +# CONFIG_AIC79XX_BUILD_FIRMWARE is not set +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set +CONFIG_AIC79XX_DEBUG_ENABLE=y +CONFIG_AIC79XX_DEBUG_MASK=0 +CONFIG_AIC79XX_REG_PRETTY_PRINT=y +# CONFIG_SCSI_DPT_I2O is not set +CONFIG_SCSI_ADVANSYS=y +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +CONFIG_SCSI_NCR53C406A=y +CONFIG_SCSI_SYM53C8XX_2=y +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA6322 is not set +# CONFIG_SCSI_SEAGATE is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_ULTRASTOR is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# PCMCIA SCSI adapter support +# +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_SYM53C500 is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_ARPD=y +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_NET_SB1000 is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +CONFIG_NET_VENDOR_3COM=y +# CONFIG_EL1 is not set +# CONFIG_EL2 is not set +# CONFIG_ELPLUS is not set +# CONFIG_EL16 is not set +CONFIG_EL3=y +# CONFIG_3C515 is not set +CONFIG_VORTEX=y +CONFIG_TYPHOON=y +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_AC3200 is not set +# CONFIG_APRICOT is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_CS89x0 is not set +# CONFIG_DGRS is not set +CONFIG_EEPRO100=y +# CONFIG_EEPRO100_PIO is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +CONFIG_NATSEMI=y +CONFIG_NE2K_PCI=y +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +CONFIG_VIA_RHINE=y +# CONFIG_VIA_RHINE_MMIO is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set +CONFIG_NS83820=y +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +CONFIG_R8169=y +# CONFIG_SK98LIN is not set +CONFIG_TIGON3=y + +# +# Ethernet (10000 Mbit) +# +CONFIG_IXGB=y +# CONFIG_IXGB_NAPI is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# PCMCIA network device support +# +# CONFIG_NET_PCMCIA is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_CONSOLE is not set +# CONFIG_SERIAL_8250_CS is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_QIC02_TAPE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_SONYPI is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_MWAVE is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# +# CONFIG_IBM_ASM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y +# CONFIG_FB_HGA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON_OLD is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=y + +# +# USB Device Class drivers +# +# CONFIG_USB_BLUETOOTH_TTY is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set + +# +# USB Human Interface Devices (HID) +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network adaptors +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_TEST is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=y + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +CONFIG_UDF_FS=y + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +# CONFIG_NFSD_TCP is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=y +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_EARLY_PRINTK=y +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +CONFIG_FRAME_POINTER=y +# CONFIG_4KSTACKS is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=y +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_ARC4 is not set +CONFIG_CRYPTO_DEFLATE=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Library routines +# +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_X86_BIOS_REBOOT=y +CONFIG_X86_STD_RESOURCES=y +CONFIG_PC=y diff --git a/misc/arch/sparc64/linux.config b/misc/arch/sparc64/linux.config new file mode 100644 index 0000000..b31e944 --- /dev/null +++ b/misc/arch/sparc64/linux.config @@ -0,0 +1,982 @@ +# +# Automatically generated make config: don't edit +# + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# General setup +# +CONFIG_BBC_I2C=m +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_SMP=y +CONFIG_SPARC64=y +CONFIG_HOTPLUG=y +CONFIG_HAVE_DEC_LOCK=y +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_ISA is not set +# CONFIG_ISAPNP is not set +# CONFIG_EISA is not set +# CONFIG_MCA is not set +# CONFIG_PCMCIA is not set +CONFIG_SBUS=y +CONFIG_SBUSCHAR=y +CONFIG_BUSMOUSE=y +CONFIG_SUN_MOUSE=y +CONFIG_SERIAL=y +CONFIG_SUN_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +CONFIG_SUN_KEYBOARD=y +CONFIG_SUN_CONSOLE=y +CONFIG_SUN_AUXIO=y +CONFIG_SUN_IO=y +CONFIG_PCI=y +CONFIG_RTC=y +CONFIG_PCI_NAMES=y +CONFIG_SUN_OPENPROMFS=m +CONFIG_NET=y +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_SYSCTL=y +CONFIG_KCORE_ELF=y +CONFIG_SPARC32_COMPAT=y +CONFIG_BINFMT_ELF32=y +# CONFIG_BINFMT_AOUT32 is not set +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_MISC=m +# CONFIG_SUNOS_EMUL is not set +CONFIG_SOLARIS_EMUL=m + +# +# Parallel port support +# +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_PC_CML1=m +# CONFIG_PARPORT_SERIAL is not set +CONFIG_PARPORT_PC_FIFO=y +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_AMIGA is not set +# CONFIG_PARPORT_MFC3 is not set +# CONFIG_PARPORT_ATARI is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_SUNBPP is not set +# CONFIG_PARPORT_OTHER is not set +CONFIG_PARPORT_1284=y +CONFIG_PRINTER=m +CONFIG_ENVCTRL=m +CONFIG_DISPLAY7SEG=m +CONFIG_WATCHDOG_CP1XXX=m +CONFIG_WATCHDOG_RIO=m + +# +# Console drivers +# +CONFIG_PROM_CONSOLE=y + +# +# Frame-buffer support +# +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_RIVA is not set +# CONFIG_FB_CLGEN is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +CONFIG_FB_SBUS=y +CONFIG_FB_CREATOR=y +CONFIG_FB_CGSIX=y +CONFIG_FB_BWTWO=y +CONFIG_FB_CGTHREE=y +CONFIG_FB_LEO=y +# CONFIG_FB_PCI is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FBCON_ADVANCED is not set +CONFIG_FBCON_MFB=y +CONFIG_FBCON_CFB8=y +CONFIG_FBCON_FONTWIDTH8_ONLY=y +CONFIG_FONT_SUN8x16=y +# CONFIG_FBCON_FONTS is not set + +# +# Misc Linux/SPARC drivers +# +CONFIG_SUN_OPENPROMIO=m +CONFIG_SUN_MOSTEK_RTC=y +CONFIG_SAB82532=y +CONFIG_OBP_FLASH=m +# CONFIG_SUN_BPP is not set +# CONFIG_SUN_VIDEOPIX is not set +CONFIG_SUN_AURORA=m + +# +# Linux/SPARC audio subsystem (EXPERIMENTAL) +# +CONFIG_SPARCAUDIO=m +CONFIG_SPARCAUDIO_CS4231=m +# CONFIG_SPARCAUDIO_DUMMY is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Block devices +# +CONFIG_BLK_DEV_FD=y +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID5=m +CONFIG_MD_MULTIPATH=m +CONFIG_BLK_DEV_LVM=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_NETLINK_DEV=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_ARPD=y +CONFIG_INET_ECN=y +# CONFIG_SYN_COOKIES is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_UNCLEAN=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_MIRROR=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_NAT_LOCAL=y +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_COMPAT_IPCHAINS=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_COMPAT_IPFWADM=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IPV6=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_LIMIT=m +CONFIG_IP6_NF_MATCH_MAC=m +CONFIG_IP6_NF_MATCH_MULTIPORT=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_MARK=m +CONFIG_IP6_NF_MATCH_LENGTH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_MARK=m +CONFIG_KHTTPD=m +# CONFIG_ATM is not set +CONFIG_VLAN_8021Q=m + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_CSZ=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_QOS=y +CONFIG_NET_ESTIMATOR=y +CONFIG_NET_CLS=y +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_POLICE=y + +# +# Network testing +# +CONFIG_NET_PKTGEN=m + +# +# ATA/IDE/MFM/RLL support +# +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_HD_IDE is not set +# CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_IDEDISK_STROKE is not set +# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set +# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set +# CONFIG_BLK_DEV_IDEDISK_IBM is not set +# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set +# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set +# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set +# CONFIG_BLK_DEV_IDEDISK_WD is not set +# CONFIG_BLK_DEV_COMMERIAL is not set +# CONFIG_BLK_DEV_TIVO is not set +# CONFIG_BLK_DEV_IDECS is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +CONFIG_BLK_DEV_IDESCSI=m +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_BLK_DEV_CMD640=y +CONFIG_BLK_DEV_CMD640_ENHANCED=y +# CONFIG_BLK_DEV_ISAPNP is not set +# CONFIG_BLK_DEV_RZ1000 is not set +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_IDEPCI_SHARE_IRQ is not set +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_PCI_WIP is not set +# CONFIG_BLK_DEV_IDEDMA_TIMEOUT is not set +# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set +CONFIG_BLK_DEV_ADMA=y +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_AEC62XX_TUNING is not set +CONFIG_BLK_DEV_ALI15X3=y +# CONFIG_WDC_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_AMD74XX_OVERRIDE is not set +CONFIG_BLK_DEV_CMD64X=y +CONFIG_BLK_DEV_CMD680=y +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_HPT34X_AUTODMA is not set +# CONFIG_BLK_DEV_HPT366 is not set +CONFIG_BLK_DEV_NS87415=y +# CONFIG_BLK_DEV_OPTI621 is not set +CONFIG_BLK_DEV_PDC202XX=y +# CONFIG_PDC202XX_BURST is not set +# CONFIG_PDC202XX_FORCE is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIS5513 is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_CHIPSETS is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_IDEDMA_IVB is not set +# CONFIG_DMA_NONPCI is not set +CONFIG_BLK_DEV_IDE_MODES=y +CONFIG_BLK_DEV_ATARAID=m +CONFIG_BLK_DEV_ATARAID_PDC=m +CONFIG_BLK_DEV_ATARAID_HPT=m + +# +# SCSI support +# +CONFIG_SCSI=y + +# +# SCSI support type (disk, tape, CDrom) +# +CONFIG_BLK_DEV_SD=y +CONFIG_SD_EXTRA_DEVS=40 +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_SR_EXTRA_DEVS=2 +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI low-level drivers +# +CONFIG_SCSI_SUNESP=y +CONFIG_SCSI_QLOGICPTI=m +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 +CONFIG_AIC7XXX_RESET_DELAY_MS=5000 +# CONFIG_AIC7XXX_PROBE_EISA_VL is not set +# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +CONFIG_SCSI_AIC7XXX_OLD=m +CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT=y +CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8 +CONFIG_AIC7XXX_OLD_PROC_STATS=y +CONFIG_SCSI_SYM53C8XX_2=y +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +CONFIG_SCSI_QLOGIC_ISP=m +# CONFIG_SCSI_QLOGIC_FC is not set + +# +# Fibre Channel support +# +# CONFIG_FC4 is not set +# CONFIG_FC4_SOC is not set +# CONFIG_FC4_SOCAL is not set +# CONFIG_SCSI_PLUTO is not set +# CONFIG_SCSI_FCAL is not set + +# +# Fusion MPT device support +# +CONFIG_FUSION=m +# CONFIG_FUSION_BOOT is not set +CONFIG_FUSION_ISENSE=m +CONFIG_FUSION_CTL=m +CONFIG_FUSION_LAN=m +CONFIG_NET_FC=y + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +CONFIG_IEEE1394=m + +# +# Device Drivers +# +# CONFIG_IEEE1394_PCILYNX is not set +CONFIG_IEEE1394_OHCI1394=m + +# +# Protocol Drivers +# +# CONFIG_IEEE1394_VIDEO1394 is not set +CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set +CONFIG_IEEE1394_ETH1394=m +CONFIG_IEEE1394_DV1394=m +CONFIG_IEEE1394_RAWIO=m +CONFIG_IEEE1394_CMP=m +# CONFIG_IEEE1394_AMDTP is not set +# CONFIG_IEEE1394_VERBOSEDEBUG is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_SUNLANCE=y +CONFIG_HAPPYMEAL=y +CONFIG_SUNBMAC=m +CONFIG_SUNQE=m +CONFIG_SUNGEM=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +CONFIG_NET_VENDOR_SMC=y +# CONFIG_WD80x3 is not set +# CONFIG_ULTRAMCA is not set +# CONFIG_ULTRA is not set +# CONFIG_ULTRA32 is not set +# CONFIG_SMC9194 is not set +CONFIG_NET_VENDOR_RACAL=y +# CONFIG_NI5010 is not set +# CONFIG_NI52 is not set +# CONFIG_NI65 is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NET_PCI=y +CONFIG_PCNET32=m +CONFIG_ADAPTEC_STARFIRE=m +# CONFIG_APRICOT is not set +# CONFIG_CS89x0 is not set +CONFIG_TULIP=m +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +CONFIG_DE4X5=m +CONFIG_DGRS=m +CONFIG_DM9102=m +CONFIG_EEPRO100=m +CONFIG_E100=m +# CONFIG_LNE390 is not set +CONFIG_FEALNX=m +CONFIG_NATSEMI=m +CONFIG_NE2K_PCI=m +# CONFIG_NE3210 is not set +# CONFIG_ES3210 is not set +CONFIG_8139CP=m +CONFIG_8139TOO=m +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +CONFIG_8139TOO_8129=y +# CONFIG_8139_OLD_RX_RESET is not set +CONFIG_SIS900=m +CONFIG_EPIC100=m +CONFIG_SUNDANCE=m +# CONFIG_SUNDANCE_MMIO is not set +# CONFIG_TLAN is not set +# CONFIG_TC35815 is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_RHINE_MMIO is not set +CONFIG_WINBOND_840=m +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set +CONFIG_DL2K=m +CONFIG_E1000=m +CONFIG_MYRI_SBUS=m +CONFIG_NS83820=m +# CONFIG_HAMACHI is not set +CONFIG_YELLOWFIN=m +# CONFIG_SK98LIN is not set +CONFIG_TIGON3=m +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PLIP=m +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +# CONFIG_SLIP_MODE_SLIP6 is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +CONFIG_NET_FC=y +# CONFIG_IPHASE5526 is not set +# CONFIG_RCPCI is not set +CONFIG_SHAPER=m + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Unix 98 PTY support +# +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 + +# +# Video For Linux +# +# CONFIG_VIDEO_DEV is not set + +# +# XFree86 DRI support +# +# CONFIG_DRM_NEW is not set +# CONFIG_DRM_FFB is not set +# CONFIG_DRM_TDFX is not set +# CONFIG_DRM_R128 is not set + +# +# Input core support +# +CONFIG_INPUT=y +CONFIG_INPUT_KEYBDEV=y +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y + +# +# File systems +# +CONFIG_QUOTA=y +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +CONFIG_AFFS_FS=m +CONFIG_HFS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +CONFIG_BFS_FS=m +CONFIG_EXT3_FS=m +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_UMSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_EFS_FS=m +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +CONFIG_CRAMFS=m +CONFIG_TMPFS=y +CONFIG_RAMFS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_JFS_FS=m +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_STATISTICS=y +CONFIG_MINIX_FS=m +CONFIG_VXFS_FS=m +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_HPFS_FS=m +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +CONFIG_QNX4FS_FS=m +CONFIG_QNX4FS_RW=y +CONFIG_ROMFS_FS=m +CONFIG_EXT2_FS=y +CONFIG_SYSV_FS=m +CONFIG_UDF_FS=m +CONFIG_UDF_RW=y +CONFIG_UFS_FS=m +CONFIG_UFS_FS_WRITE=y + +# +# Network File Systems +# +CONFIG_CODA_FS=m +CONFIG_INTERMEZZO_FS=m +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_ROOT_NFS is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +CONFIG_NFSD_TCP=y +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_ZISOFS_FS=m + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SMB_NLS=y +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Sound +# +CONFIG_SOUND=m +CONFIG_SOUND_ALI5455=m +CONFIG_SOUND_BT878=m +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_MIDI_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +CONFIG_SOUND_ES1371=m +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +CONFIG_SOUND_FORTE=m +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_SONICVIBES is not set +CONFIG_SOUND_TRIDENT=m +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +# CONFIG_MIDI_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_TVMIXER is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_LONG_TIMEOUT is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_EHCI_HCD is not set +CONFIG_USB_UHCI=y +# CONFIG_USB_UHCI_ALT is not set +CONFIG_USB_OHCI=y + +# +# USB Device Class drivers +# +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_EMI26 is not set +CONFIG_USB_BLUETOOTH=m +CONFIG_USB_MIDI=m +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_HP8200e=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m + +# +# USB Human Interface Devices (HID) +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDDEV is not set +CONFIG_USB_AIPTEK=m +CONFIG_USB_WACOM=m + +# +# USB Imaging devices +# +CONFIG_USB_DC2XX=m +CONFIG_USB_MDC800=m +CONFIG_USB_SCANNER=m +CONFIG_USB_MICROTEK=m +CONFIG_USB_HPUSBSCSI=m + +# +# USB Multimedia devices +# + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network adaptors +# +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_KAWETH=m +CONFIG_USB_CATC=m +CONFIG_USB_CDCETHER=m +CONFIG_USB_USBNET=m + +# +# USB port drivers +# +CONFIG_USB_USS720=m + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_SERIAL_DEBUG is not set +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +# CONFIG_USB_SERIAL_IR is not set +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OMNINET=m + +# +# USB Miscellaneous drivers +# +CONFIG_USB_RIO500=m +# CONFIG_USB_AUERSWALD is not set +CONFIG_USB_TIGL=m +# CONFIG_USB_BRLVGER is not set +CONFIG_USB_LCD=m + +# +# Bluetooth support +# +CONFIG_BLUEZ=m +CONFIG_BLUEZ_L2CAP=m +CONFIG_BLUEZ_SCO=m +CONFIG_BLUEZ_BNEP=m +# CONFIG_BNEP_MC_FILTER is not set +# CONFIG_BNEP_PROTO_FILTER is not set + +# +# Bluetooth device drivers +# +CONFIG_BLUEZ_HCIUSB=m +CONFIG_BLUEZ_USB_ZERO_PACKET=y +CONFIG_BLUEZ_HCIUART=m +CONFIG_BLUEZ_HCIUART_H4=y +# CONFIG_BLUEZ_HCIDTL1 is not set +# CONFIG_BLUEZ_HCIBT3C is not set +# CONFIG_BLUEZ_HCIBLUECARD is not set +CONFIG_BLUEZ_HCIVHCI=m + +# +# Watchdog +# +CONFIG_SOFT_WATCHDOG=m + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SLAB is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_DCFLUSH is not set +# CONFIG_STACK_DEBUG is not set + +# +# Library routines +# +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m diff --git a/misc/crossbuild/fake_utsname/Makefile b/misc/crossbuild/fake_utsname/Makefile new file mode 100644 index 0000000..0942e11 --- /dev/null +++ b/misc/crossbuild/fake_utsname/Makefile @@ -0,0 +1,12 @@ +# Makefile of fake_utsname.o + +INCLUDEDIR = /usr/include +CC = gcc +CFLAGS = -D__KERNEL__ -DMODULE -O -Wall + +OBJ = fake_utsname.o + +all: $(OBJ) + +clean: + rm -f $(OBJ) *~ core diff --git a/misc/crossbuild/fake_utsname/fake_utsname.c b/misc/crossbuild/fake_utsname/fake_utsname.c new file mode 100644 index 0000000..8deae08 --- /dev/null +++ b/misc/crossbuild/fake_utsname/fake_utsname.c @@ -0,0 +1,57 @@ +/* fake_utsname.o + * + * author: hackbard@hackdaworld.dyndns.org + * + */ + +/* what for: + * + * fake the machine type discovered by "uname -m" call. + * this is possibly needed by some crossbuilds, where packages try to determine + * the host or target architecture with the help of uname output. + * + * usage: + * + * insmod fake_utsname.o mname="" + * where could be: + * sparc64 + * i386 + * etc ... + */ + +#include +#include +#include +#include + +#define UTSNAME_M_LEN 65 + +/* if there is no define ... */ +#ifndef FAKE_M_UTSNAME +#define FAKE_M_UTSNAME "sparc64" +#endif + +MODULE_LICENSE("GPL v2"); + +char mname_orig[UTSNAME_M_LEN]; +char *mname=FAKE_M_UTSNAME; + +MODULE_PARM(mname,"s"); + +int init_module(void) { + int i; + + memset(mname_orig,0,UTSNAME_M_LEN); + memcpy(mname_orig,system_utsname.machine,sizeof(system_utsname.machine)); + i=strlen(mname); + memcpy(system_utsname.machine,mname,i); + memset(system_utsname.machine+i,0,UTSNAME_M_LEN-i); + + return(0); +} + +void cleanup_module(void) { + + memcpy(system_utsname.machine,mname_orig,UTSNAME_M_LEN); + +} diff --git a/misc/crossbuild/fake_utsname/fake_utsname.o b/misc/crossbuild/fake_utsname/fake_utsname.o new file mode 100644 index 0000000000000000000000000000000000000000..b42b966d1a140eb3a40db271d2366f0538e688b8 GIT binary patch literal 1592 zcmb7E&r1|x7=CAW%O7cJAOu0~!9p)n{wN}l5GyGpgwTwzaa?C}X=hh<#>i8`o(AjE z-%ytoI-4Ct4UA5DlTJbe#d;`(@(^s#v-5r1?j`VrZ=Uyge|_(~-+c4@=I|}UFhq+X zQTfM2Mk1l7uMC~iER8Z6e7!$*FTdBcO5+M2?*{M)KIV6$`9s5R!y{LhKaBWo#dB-l zBf-|eQn6hrg<_l1l1s(Lidxu=b+FRrjgD9h9RTZD^xL0OskGQn*D@a~prv4Y|LyPX z+rg(*hAv*F1CLAA4nofefi47Xlsf3g9oc^Ja;rP=Y@n-E@;z~Fqx+~&lY}cun!G{cDuVCT3d;q>7s|X|dKLc+JdGW$1LIf&Sgo>Ox&ze0 zULI%yB%j1$F6%O1lJ*nFn)5yW56lGa4lb3Y{vy4768=~zXJ#~qeGzT+VVo4n03#S0ud0EAeWC2H6fY?L QMPZSM{6iq~C +#include +#include +#include +#include + +#define BUFFER_SIZE (8*1024-1) +static char buffer[BUFFER_SIZE+1]; + +#define EOT 004 + +int main(int argc, char ** argv) { + int rc,mode,x,y; + int remove_zeros=0; + int pos=0,loop=1; + + if ( argc!=3 || (argv[1][0]!='a' && argv[1][0]!='t') ) { + printf("Usage: %s {a|t} [file]\n",argv[0]); + return 1; + } + + if (argv[1][0]=='a') + mode=O_WRONLY|O_CREAT|O_APPEND; + else + mode=O_WRONLY|O_CREAT|O_TRUNC; + + while (loop) { + if (pos >= BUFFER_SIZE) { + fprintf(stderr,"%s: Buffer is full -> drop data!\n",argv[0]); + pos=0; + } + + rc=read(0,buffer+pos,BUFFER_SIZE-pos); + if (rc <= 0) return 0; + buffer[pos+rc+1]=0; + + if (rc>0) { + write(1,buffer+pos,rc); + + for (x=0; x=0; y--) { + if (buffer[y]=='\n') break; + buffer[y]=0; + } + remove_zeros=1; + } + } + + pos+=rc; + + if (remove_zeros) { + for (x=y=0; x=0) { + write(rc,buffer,pos); + close(rc); + pos=0; + mode=O_WRONLY|O_APPEND; + } + } + } + + return 0; +} diff --git a/misc/hdw-tools/hdw-get b/misc/hdw-tools/hdw-get new file mode 100644 index 0000000..8be36e2 --- /dev/null +++ b/misc/hdw-tools/hdw-get @@ -0,0 +1,118 @@ +#!/bin/sh +# +# author: hackbard@hackdaworld.dyndns.org +# +# hdw-tools: +# this is hdw-get script, used to install/remove/(update) binary packages +# + +usage() { + echo + echo "usage: $0 [install/remove] [directory] [package]" + echo +} +package="" ; inst_root="" +verbose="" + +while [ "$1" ] ; do + case "$1" in + install) install="1" + inst_root="$2" ; package="$3" ; shift 3 ;; + remove) remove="1" + inst_root="$2" ; package="$3" ; shift 3 ;; + -v) verbose=1 ; shift 1 ;; + *) usage ; exit 1 ;; + esac +done + +if [ -z "inst_root" -o -z "$package" ] ; then + usage ; exit 1 +fi + +# read hdw-get configs +net_addr="" ; bin_dir="" +if [ -f /etc/hdw-get.conf ] ; then + . /etc/hdw-get.conf + if [ -z "$hdw_version" -o -z "$hdw_arch" -o -z "$hdw_arch_opt" ] ; then + echo "version, arch and arch_opt need to be specified." + echo "adjust /etc/hdw-get.conf file" + exit + else + echo "hdw-get.conf file looks good ..." + fi +else + echo "/etc/hdw-get.conf file not found, aborting" + exit 1 +fi + +# remove +if [ "$remove" = "1" ] ; then + # looking for flist file + fl_pris="" + for fl_file in $inst_root/var/adm/flists/$package-*; do + fl_pris="`echo $fl_file | awk -F- '{ print $NF }'` $fl_pris" + done + fl_max="0" + for pri in $fl_pris; do + if [ "$pri" = "x" ] ; then + fl_max="x" + break + fi + [ "$pri" -gt "$fl_max" ] && fl_max=$pri + done + fl_file="$inst_root/var/adm/flists/$package-$fl_max" + [ "$verbose" ] && echo "expecting flist file $fl_file" + if [ ! -f $fl_file ] ; then + echo "package $apckage is not installed (moved the flist file?)" + exit 1 + fi + ((supposed = 0)) + ((counter = 0)) + cat $fl_file | while read pkg file; do + ((supposed += 1)) + if [ -e $inst_root/$file ] ; then + if [ "$file" != "tmp" ] ; then + if [ -d $inst_root/$file ] ; then + rmdir -p $inst_root/$file > /dev/null 2>&1 + else + rm -f $inst_root/$file > /dev/null 2>&1 + rmdir -p `dirname $file` > /dev/null 2>&1 + fi + ((counter += 1)) + fi + fi + echo -en "\rremoved $counter from $supposed supposed files" + done + echo -en "\ndone.\n" + +# install +elif [ "$install" = "1" ] ; then + # does inst_root exist + if [ ! -d $inst_root ] ; then + echo + echo "the install directory doesnt exist, create it first" + echo + exit 1 + fi + # does the package exist + if [ -f $package ] ; then + echo "extracting `basename $package` to $inst_root ..." + tar --use-compress-program=bzip2 -xf $package \ + -C $inst_root + echo "done" + elif [ ! -z "$bin_dir" -a -f $bin_dir/$package/$package.tar.bz2 ] ; then + echo "extracting $package to $inst_root ..." + tar --use-compress-program=bzip2 \ + -xf $bin_dir/$package/$package.tar.bz2 -C $inst_root + elif [ ! -z "$net_addr" ] ; then + #echo "trying to get package $package via net ..." + wget $net_addr/hdw-linux/hdw-linux-$hdw_version/binaries/${hdw_arch}-${hdw_arch_opt}/$package/${package}.tar.bz2 && + tar --use-compress-program=bzip2 \ + -xf ${package}.tar.bz2 -C $inst_root + rm ${package}.tar.bz2 + echo "done" + else + echo "sorry, package $package not found" + fi +fi + diff --git a/misc/internal/make_tar.sh b/misc/internal/make_tar.sh new file mode 100755 index 0000000..65f2672 --- /dev/null +++ b/misc/internal/make_tar.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# author: hackbard@hackdaworld.dyndns.org +# +# hdw - linux make tar script +# just for personal use to make tarballs from the cvs snaps! +# + +# make a tarball from the hdw sources +if [ -z "$1" ] ; then + version="0.3-dev" +else + version="$2" +fi + +d_tag=`date | awk '{ print $6 "-" $2 "-" $3 }'` +c_tag=`date | awk '{ print $4 }' | sed 's/:/-/g'` +tag="-${d_tag}-${c_tag}" +[ -z "`echo $version | grep 'dev'`" ] && tag="" + +if [ -f hdw-linux-${version}${tag}* ] ; then + echo "delete old tarball pls!" + exit 1 +fi + +rm -rf hdw-linux-${version} +cvs -d:pserver:anonymous@right-hand:/hdw-linux co hdw-linux-${version} +cd hdw-linux-${version} +rm -r CVS +rm -r */CVS +rm -r */*/CVS +rm -r */*/*/CVS +rm -r */*/*/*/CVS +rm -r */*/*/*/*/CVS + +cd .. +tar cvf hdw-linux-${version}${tag}.tar hdw-linux-${version} +bzip2 hdw-linux-${version}${tag}.tar +scp hdw-linux-${version}${tag}.tar.bz2 \ +right-hand:/chroot/www/htdocs/download/hdw-linux/hdw-linux-$version/snapshots/ +scp hdw-linux-${version}${tag}.tar.bz2 \ +zirkelfr@everest.physik.uni-augsburg.de:~/public_html/download/hdw-linux/hdw-linux-${version}.tar.bz2 +#rm hdw-linux-${version}${tag}.tar.bz2 +rm -r hdw-linux-${version} + +echo "done" + + diff --git a/misc/sysfiles/etc/HOSTNAME b/misc/sysfiles/etc/HOSTNAME new file mode 100644 index 0000000..5f2f1f5 --- /dev/null +++ b/misc/sysfiles/etc/HOSTNAME @@ -0,0 +1 @@ +hdw diff --git a/misc/sysfiles/etc/conf/bootdown b/misc/sysfiles/etc/conf/bootdown new file mode 100644 index 0000000..b941577 --- /dev/null +++ b/misc/sysfiles/etc/conf/bootdown @@ -0,0 +1,19 @@ +# hdw - linux /etc/conf/bootdown +# +# configure core bootup and shutdown procedures +# + +# skip filesystem checking +FASTBOOT=0 + +# easy fs check +EASYFSCK=1 + +# force fs check +FORCEFSCK=0 + +# fast, less save way of shutdown +FASTDOWN=0 + +# clean /tmp directory at boot time +TEMPCLEAN=1 diff --git a/misc/sysfiles/etc/conf/kernel b/misc/sysfiles/etc/conf/kernel new file mode 100644 index 0000000..5918a84 --- /dev/null +++ b/misc/sysfiles/etc/conf/kernel @@ -0,0 +1,8 @@ +# hdw - linux /etc/conf/kernel +# + + +# modprobe drivers + +# echo's to /proc fs + diff --git a/misc/sysfiles/etc/conf/network b/misc/sysfiles/etc/conf/network new file mode 100644 index 0000000..9644b5e --- /dev/null +++ b/misc/sysfiles/etc/conf/network @@ -0,0 +1,51 @@ +# hdw - linux /etc/conf/network +# +# defining {start,stop}_net functions used by /etc/init.d/network +# (copied from ROCK Linux + some additions) +# + +DHCP="off" + +IF_0="eth0" +IPADDR_0="192.168.10.20" +NETMASK_0="255.255.255.0" +GATEWAY_0="192.168.10.10" +#OPTIONS_0="mtu 1412" + +# +# start and stop functions (called by /etc/init.d/network) +# + +xx() { echo ">> $*" ; eval "$*" ; } + +start_net() { + if [ ".$DHCP" = ".on" ] ; then + echo "starting dhclient." + /sbin/dhclient -q $IF_0 + else + echo "setting up network ..." + # xx insmod ip_tables + # xx iptables -A chain rule-specification [options] + # xx echo 1 '>' /proc/sys/net/ipv4/ip_forward + xx ifconfig $IF_0 $IPADDR_0 netmask $NETMASK_0 up # $OPTIONS_0 + xx route add default gw $GATEWAY_0 dev $IF_0 + fi + # ipsec + [ -f /etc/setkey.conf -a -f /usr/sbin/setkey ] && + xx /usr/sbin/setkey -f /etc/setkey.conf +} + +stop_net() { + if [ ".$DHCP" = ".on" ] ; then + echo "stopping dhclient." + killall -15 /sbin/dhclient + ifconfig $IF_0 down + else + echo "shutting down network ..." + xx route del default gw $GATEWAY_0 dev $IF_0 + xx ifconfig $IF_0 down + # xx echo 0 '>' /proc/sys/net/ipv4/ip_forward + # xx iptables -D chain rule-specification [options] + # xx rmmod ip_tables + fi +} diff --git a/misc/sysfiles/etc/conf/profile b/misc/sysfiles/etc/conf/profile new file mode 100644 index 0000000..d5f3b30 --- /dev/null +++ b/misc/sysfiles/etc/conf/profile @@ -0,0 +1,22 @@ +# hdw - linux /etc/conf/profile (copied from ROCK Linux) +# + +# sourced from /etc/profile, add your stuff here! + +# set -o vi +o posix +# export EDITOR="nvi" +# export PAGER="less -R -F -M" + +if [ "$PS1" ] ; then + case "$TERM" in *xterm*) + [ "$TERM" = "xterm" ] && TERM="nxterm" + set_xterm_title() { echo -ne "\033]0;$*\007" ; } ;; + esac + + # if bash is not in POSIX mode, set a more inteligent prompt + # + [ "$BASH_VERSION" -a -z "$POSIXLY_CORRECT" ] && + PS1='\u@\h:$([ ${#PWD} -lt 30 ] && builtin echo "\w" || builtin echo "[\W]" ; echo )\$ ' + + alias beep='echo -en \\007' +fi diff --git a/misc/sysfiles/etc/dircolors b/misc/sysfiles/etc/dircolors new file mode 100644 index 0000000..e7a965a --- /dev/null +++ b/misc/sysfiles/etc/dircolors @@ -0,0 +1,86 @@ +# Configuration file for dircolors, a utility to help you set the +# LS_COLORS environment variable used by GNU ls with the --color option. + +# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the +# slackware version of dircolors) are recognized but ignored. + +# Below, there should be one TERM entry for each termtype that is colorizable +TERM linux +TERM console +TERM con132x25 +TERM con132x30 +TERM con132x43 +TERM con132x60 +TERM con80x25 +TERM con80x28 +TERM con80x30 +TERM con80x43 +TERM con80x50 +TERM con80x60 +TERM xterm +TERM vt100 +TERM vt220 +TERM screen + +# Below are the color init strings for the basic file types. A color init +# string consists of one or more of the following numeric codes: +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white +NORMAL 00 # global default, although everything should be something. +FILE 00 # normal file +DIR 01;34 # directory +LINK 01;36 # symbolic link +FIFO 35 # pipe +SOCK 01;35 # socket +BLK 35;01 # block device driver +CHR 35;01 # character device driver +ORPHAN 31;01 # symlink to nonexistent file + +# This is for files with execute permission: +EXEC 01;32 + +# List any file extensions like '.gz' or '.tar' that you would like ls +# to colorize below. Put the extension, a space, and the color init string. +# (and any comments you want to add after a '#') + +.cmd 01;32 # DOS executables (bright green) +.exe 01;32 +.com 01;32 +.btm 01;32 +.bat 01;32 + +.tar 01;31 # archives or compressed (bright red) +.tgz 01;31 +.arj 01;31 +.taz 01;31 +.lzh 01;31 +.zip 01;31 +.z 01;31 +.Z 01;31 +.gz 01;31 +.bz2 01;31 +.tbz2 01;31 +.deb 01;31 +.rpm 01;31 +.cpio 01;31 + +.jpg 01;35 # image formats +.jpeg 01;35 +.gif 01;35 +.bmp 01;35 +.ppm 01;35 +.tga 01;35 +.xbm 01;35 +.xpm 01;35 +.tif 01;35 +.tiff 01;35 +.mpg 01;35 +.mpeg 01;35 +.avi 01;35 +.xcf 01;35 +.gl 01;35 +.dl 01;35 diff --git a/misc/sysfiles/etc/fstab b/misc/sysfiles/etc/fstab new file mode 100644 index 0000000..620c584 --- /dev/null +++ b/misc/sysfiles/etc/fstab @@ -0,0 +1,8 @@ +# hdw - linux /etc/fstab + +/dev/root / ext2 defaults 0 0 +none /dev ramfs defaults 0 0 +none /dev/shm tmpfs defaults 0 0 +none /proc proc defaults 0 0 +none /dev/pts devpts defaults 0 0 +none /sys sysfs defaults 0 0 diff --git a/misc/sysfiles/etc/group b/misc/sysfiles/etc/group new file mode 100644 index 0000000..5b6803b --- /dev/null +++ b/misc/sysfiles/etc/group @@ -0,0 +1,12 @@ +root:x:0: +bin:x:1: +daemon:x:2: +shadow:x:3: +tty:x:5: +disk:x:6: +kmem:x:7: +mail:x:10: +games:x:11: +nogroup:x:65534: +nobody:x:65534: +users:x:100: diff --git a/misc/sysfiles/etc/host.conf b/misc/sysfiles/etc/host.conf new file mode 100644 index 0000000..734514d --- /dev/null +++ b/misc/sysfiles/etc/host.conf @@ -0,0 +1,6 @@ +# hdw - linux /etc/host.conf +# +# man 5 host.conf + +order hosts bind + diff --git a/misc/sysfiles/etc/hosts b/misc/sysfiles/etc/hosts new file mode 100644 index 0000000..1801e69 --- /dev/null +++ b/misc/sysfiles/etc/hosts @@ -0,0 +1,14 @@ +# hdw - linux /etc/hosts +# + +# default IPv4 entries +# +127.0.0.1 localhost + +# default IPv6 entries +# +::1 ipv6-localhost ipv6-loopback +fe00::0 ipv6-localnet +ff00::0 ipv6-mcastprefix +ff02::1 ipv6-allnodes +ff02::2 ipv6-allrouters diff --git a/misc/sysfiles/etc/init.d/boot b/misc/sysfiles/etc/init.d/boot new file mode 100755 index 0000000..7352c7e --- /dev/null +++ b/misc/sysfiles/etc/init.d/boot @@ -0,0 +1,163 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/boot (copied from ROCK Linux + modifications) +# +# lowlevel bootup script +# + +exec 2>&1 + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +echo "** booting hdw-linux... **" + +. /etc/conf/bootdown +[ -f /fastboot ] && FASTBOOT=1 ; [ -f /forcefsck ] && FORCEFSCK=1 +if [ $FORCEFSCK = 1 ] ; then echo "going to force fsck" ; FASTBOOT=0 ; fi +[ $FASTBOOT = 1 ] && echo "fast boot mode enabled" + +mount -v -n /dev +mount -v -n /proc ; mount -v -n /sys +mkdir -p /dev/shm ; mount -v -n /dev/shm +mkdir -p /dev/pts ; mount -v -n /dev/pts + +echo "loading kernel modules and configuring the kernel ..." +. /etc/conf/kernel + +echo "populating device nodes ..." +/etc/init.d/udev start + +if [ -f /etc/conf/devfs ] ; then + echo "configuring device nodes ..." + . /etc/conf/devfs +fi + +echo "activating swap-devices ..." +swapon -a + +if [ $FASTBOOT != 1 ] +then + echo "checking file systems (1/3) ..." + mount -n -o remount,ro / + if [ $FORCEFSCK = 1 ] + then fsck -A -C -a -f ; fsckrc=$? ; sync ; sleep 3 + else fsck -A -C -a ; fsckrc=$? ; sync ; sleep 3 + fi + x=2 + [ $fsckrc -eq 1 -a $EASYFSCK = 1 ] && fsckrc=0 + while [ $fsckrc -eq 1 -a $x -lt 4 ] + do + echo "filesystem check modified disks!" + echo "checking file systems ($x/3) ..." + fsck -A -C -a -f ; fsckrc=$? ; sync ; sleep 3 + if [ $x -eq 3 ] ; then x=4 ; else x=3 ; fi + done + if [ $fsckrc -eq 0 ] + then + echo "all checked filesystems are clear." + if [ $x != 2 ] ; then + echo " **" + echo " ** filesystem check modified disks." + echo " **" + echo " ** going to reboot the system." + echo " **" + for x in 10 9 8 7 6 5 4 3 2 ; do + echo -en "\rsystem reboot in $x seconds ... " + sleep 1 + done ; echo -e "\rsystem reboot now! " + /sbin/reboot -d -f + exit + fi + else + echo " **" + echo " ** filesystem check failed (returncode=$fsckrc)." + echo " ** please repair the broken disk(s) manually." + echo " **" + echo " ** note: The kernel parameter '-b' can be used to boot" + echo " ** directly into a single-user login shell." + echo " **" + echo " ** going to reboot the system." + echo " **" + for x in 10 9 8 7 6 5 4 3 2 ; do + echo -en "\rsystem reboot in $x seconds ... " + sleep 1 + done ; echo -e "\rsystem reboot now! " + /sbin/reboot -d -f + exit + fi +fi + +mount -v -n -o remount,rw / +grep -E -v '^none (/|[a-z]+:) ' /proc/mounts > /etc/mtab +mount -v -a -t nocoda,nfs + +if type hostname > /dev/null 2>&1 +then + echo "set the hostname to [`cat /etc/HOSTNAME`] ..." + hostname `cat /etc/HOSTNAME` +else + echo "hostname not set: no 'hostname' command found" +fi + +echo "refresh utmp, delete lock files and other stuff ..." +rm -f /var/lock/* /var/lock/*/* /var/run/* 2> /dev/null +touch /var/run/utmp ; chmod 664 /var/run/utmp ; chown root.tty /var/run/utmp +rm -f /etc/nologin /nologin /fastboot /forcefsck /fastdown + +if [ "$TEMPCLEAN" = 1 ] ; then + echo "cleaning up /tmp ..." + for x in /tmp/* /tmp/.[!.]* ; do + if [ -O "$x" ] ; then + [ "$x" != "/tmp/lost+found" ] && + [ "$x" != "/tmp/quota.user" ] && + [ "$x" != "/tmp/quota.group" ] && + rm -rf -- "$x" + else + rm -rf -- "$x" + fi + done +fi + +if type klogd > /dev/null 2>&1 +then + echo "writing /var/log/boot.msg ..." + klogd -f /var/log/boot.new -o + grep '.' < /var/log/boot.new > /var/log/boot.msg + rm /var/log/boot.new +else + echo "kernel boot messages are not logged: no 'klogd' command found." +fi + +if type loadkeys > /dev/null 2>&1 +then + echo "set the keyboard keymappings ..." + if [ -L /etc/default.keymap ] ; then + oldpwd="`pwd`" ; cd /etc + loadkeys `ls -l default.keymap | tr -s ' ' | cut -f11 -d' '` + cd "$oldpwd" ; unset oldpwd + elif [ -f /etc/default.keymap ] ; then + loadkeys /etc/default.keymap + else + echo "no /etc/default.keymap found." + fi +else + echo "keymappings not configured: no 'loadkeys' command found." +fi + +if type ifconfig > /dev/null 2>&1 +then + echo "setting up loopback networking ..." + ifconfig lo 127.0.0.1 netmask 255.0.0.0 up + route add -net 127.0.0.0 netmask 255.0.0.0 dev lo +fi + +echo 'setting overflow UID and GID kernel parameters ...' +sysctl -w kernel.overflowuid=`id -u nobody` | tr -d '\n' +echo -n ', ' ; sysctl -w kernel.overflowgid=`id -g nobody` + +echo "initializing kernel random number generator ..." +[ -f /var/state/random-seed ] && cat /var/state/random-seed >/dev/urandom +dd if=/dev/urandom of=/var/state/random-seed count=1 2> /dev/null + +# write EOT mark for btee +echo -ne '\004' diff --git a/misc/sysfiles/etc/init.d/cron b/misc/sysfiles/etc/init.d/cron new file mode 100755 index 0000000..b81630c --- /dev/null +++ b/misc/sysfiles/etc/init.d/cron @@ -0,0 +1,26 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/cron (copied from ROCK Linux) +# +# daemon to execute scheduled commands +# + +test -f /usr/sbin/cron || exit 0 + +case "$1" +in + start) + echo "Starting cron." + /usr/sbin/cron + ;; + stop) + echo "Stopping cron." + killall -15 /usr/sbin/cron + ;; + restart) + $0 stop ; $0 start ;; + *) + echo "Usage: $0 { start | restart | stop }" ; exit 1 ;; +esac + +exit 0 diff --git a/misc/sysfiles/etc/init.d/down b/misc/sysfiles/etc/init.d/down new file mode 100755 index 0000000..bca54fc --- /dev/null +++ b/misc/sysfiles/etc/init.d/down @@ -0,0 +1,86 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/down (copied from ROCK Linux) +# +# shutdown and reboot script. +# + +exec 2>&1 + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +case "$1" in + *halt) command=halt ;; + *reboot) command=reboot ;; + *) echo "never call this script directly !" ; exit 1 ;; +esac + +touch /var/log/init.msg /var/log/boot.msg +mv /var/log/init.msg /var/log/init.old +mv /var/log/boot.msg /var/log/boot.old + +echo "** shutting down hdw-linux **" + +. /etc/conf/bootdown +[ -f /fastdown ] && FASTDOWN=1 +[ $FASTDOWN = 1 ] && echo "fast shutdown mode enabled." + +echo "writing a wtmp record ..." +$command -w + +echo "saving kernel random seed ..." +dd if=/dev/urandom of=/var/state/random-seed count=1 2> /dev/null + +if [ $FASTDOWN = 1 ] +then + echo "sending all processes a SIGTERM (15) ..." + killall5 -15 ; sleep 3 + echo "sending all processes a SIGKILL (9) ..." + killall5 -9 ; sleep 2 +else + echo "sending all processes a SIGTERM (15) ..." + killall5 -15 ; sleep 5 + echo "sending all processes a 2nd SIGTERM (15) ..." + killall5 -15 ; sleep 3 + echo "sending all processes a SIGKILL (9) ..." + killall5 -9 ; sleep 3 + echo "sending all processes a 2nd SIGKILL (9) ..." + killall5 -9 ; sleep 3 +fi + +echo "turning off swap ..." +swapoff -a ; sync ; sleep 1 + +if [ $FASTDOWN = 1 ] +then + echo "unmounting file systems ..." + umount -vnra -t noproc,devfs,shm + mount -vn -o remount,ro / + sleep 1 ; sync ; sleep 1 +else + echo "remounting sync/ro and umount filesystems ..." + grep -v '^none ' /etc/mtab /proc/mounts | grep -v ' / ' | \ + cut -f1,2 -d' ' | sort -u -k2 -t' ' | sort -r -k2 -t' ' | \ + while read dev fs ; do + echo -n "$dev on $fs: sync" ; mount -o remount,sync $fs + echo -n " ro" ; mount -o remount,ro $fs + echo " umount" ; umount $fs + done + + echo "shutting down udev ..." + /etc/init.d/udev stop + umount /dev/pts + umount /dev/shm + umount /dev + + echo "unmounting remaining file systems ..." + sync ; sleep 1 ; sync + grep -E -v '^none (/|[a-z]+:) ' /proc/mounts > /etc/mtab + umount -vnra -t noproc,devfs,shm + mount -vn -o remount,sync / + mount -vn -o remount,ro / + sleep 1 ; sync ; sleep 1 +fi + +echo "going to $command the system ..." +exec $command -d -f -i -p diff --git a/misc/sysfiles/etc/init.d/network b/misc/sysfiles/etc/init.d/network new file mode 100755 index 0000000..e213641 --- /dev/null +++ b/misc/sysfiles/etc/init.d/network @@ -0,0 +1,24 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/network (copied from ROCK Linux) +# +# low level network stuff +# + +. /etc/conf/network + +case "$1" +in + start) + start_net + ;; + stop) + stop_net + ;; + restart) + $0 stop ; $0 start ;; + *) + echo "Usage: $0 { start | restart | stop }" ; exit 1 ;; +esac + +exit 0 diff --git a/misc/sysfiles/etc/init.d/nscd b/misc/sysfiles/etc/init.d/nscd new file mode 100755 index 0000000..b0ce599 --- /dev/null +++ b/misc/sysfiles/etc/init.d/nscd @@ -0,0 +1,31 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/nscd (copied from ROCK Linux) +# +# name switch cache daemon +# + +[ -f /etc/nscd.conf ] || exit 0 +[ -x /usr/sbin/nscd ] || exit 0 + +case "$1" +in + start) + echo "starting nscd." + /usr/sbin/nscd + ;; + stop) + echo "stopping nscd." + /usr/sbin/nscd -K + ;; + status) + /usr/sbin/nscd -g + ;; + restart) + $0 stop ; $0 start + ;; + *) + echo "Usage: $0 { start | restart | stop | status }" ; exit 1 ;; +esac + +exit 0 diff --git a/misc/sysfiles/etc/init.d/rc b/misc/sysfiles/etc/init.d/rc new file mode 100755 index 0000000..1b81cbc --- /dev/null +++ b/misc/sysfiles/etc/init.d/rc @@ -0,0 +1,75 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/rc +# +# controls switching of runlevels (copied from ROCK Linux) +# + +exec 2>&1 + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +echo "** running rc script **" + +echo "RC: Previous runlevel: $PREVLEVEL, current runlevel: $RUNLEVEL." + +curdir=/etc/init.d/rc$RUNLEVEL.d +prevdir=/etc/init.d/rc$PREVLEVEL.d + +# +# run the KILL scripts of the previous runlevel (if needed) +# +if ! [ $PREVLEVEL = S -o $PREVLEVEL = N ] +then + echo "RC: Leave runlevel $PREVLEVEL ..." + for i in $prevdir/K*; do + test -x "$i" || continue + x="`echo "$i" | sed "s,$prevdir/K..,$curdir/S??,"`" + [ "`echo $x`" = "$x" ] || continue ; unset x + $i stop < /dev/null + done +fi + +echo "RC: Enter runlevel $RUNLEVEL ..." + +if [ $RUNLEVEL = S ] +then + # + # Kill all processes + # + echo "Sending all processes a SIGTERM (15) ..." + killall5 -15 + sleep 5 + echo "Sending all processes a 2nd SIGTERM (15) ..." + killall5 -15 + sleep 3 + echo "Sending all processes a SIGKILL (9) ..." + killall5 -9 + sleep 3 +elif [ $RUNLEVEL = 0 -o $RUNLEVEL = 6 ] +then + # + # shut down the system + # + if [ $RUNLEVEL = 0 ] ; then + mode=halt ; else mode=reboot ; fi + /etc/init.d/down $mode | /sbin/btee a /var/log/init.old + exit 0 +else + # + # run the START scripts of the current (new) runlevel + # + for i in $curdir/S*; do + test -x "$i" || continue + x="`echo "$i" | sed "s,$curdir/S..,$prevdir/K??,"`" + [ "`echo $x`" = "$x" ] || continue ; unset x + $i start < /dev/null + done +fi + +echo "RC: The system is now in runlevel $RUNLEVEL." + +# write EOT mark for btee +echo -ne '\004' + +exit 0 diff --git a/misc/sysfiles/etc/init.d/sysklogd b/misc/sysfiles/etc/init.d/sysklogd new file mode 100755 index 0000000..425d445 --- /dev/null +++ b/misc/sysfiles/etc/init.d/sysklogd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/sysklogd (copied from ROCK Linux) +# +# linux system logging utilities +# + +test -f /usr/sbin/klogd || exit 0 +test -f /usr/sbin/syslogd || exit 0 + +case "$1" +in + start) + echo -n "starting system log daemons: syslogd " + /usr/sbin/syslogd + echo -n "klogd " + /usr/sbin/klogd + echo "done." + ;; + stop) + echo -n "stopping system log daemons: syslogd " + killall -15 /usr/sbin/klogd + echo -n "klogd " + killall -15 /usr/sbin/syslogd + echo "done." + ;; + restart) + $0 stop ; sleep 1 ; $0 start ;; + *) + echo "Usage: $0 { start | restart | stop }" ; exit 1 ;; +esac + +exit 0 diff --git a/misc/sysfiles/etc/initscript b/misc/sysfiles/etc/initscript new file mode 100755 index 0000000..aaffd25 --- /dev/null +++ b/misc/sysfiles/etc/initscript @@ -0,0 +1,20 @@ +# hdw - linux /etc/initscript (copied from ROCK Linux) +# + +# umask to safe level & enable core dumps. +# +umask 022 +ulimit -c 2097151 +PATH=/bin:/sbin:/usr/bin:/usr/sbin +export PATH + +# Make sure we have a /dev/console +# +if ! [ -e /dev/.devfsd ] ; then + mount -v -n -t devfs none /dev + echo "Mounted /dev (devfs) from /etc/initscript." > /dev/console +fi + +# Execute the program. +# +eval exec "$4" > /dev/console 2>&1 < /dev/console diff --git a/misc/sysfiles/etc/inittab b/misc/sysfiles/etc/inittab new file mode 100644 index 0000000..2ec8ada --- /dev/null +++ b/misc/sysfiles/etc/inittab @@ -0,0 +1,33 @@ +# hdw - linux /etc/inittab (copied from ROCK Linux) +# +# man 5 inittab + +# default 2 +id:2:initdefault: + +# boot script +si::sysinit:/etc/init.d/boot | /sbin/btee t /var/log/init.msg + +# 0 = halt, 6 = reboot +# 1-5 = multi-user +# S = single user +l0:0:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +l1:1:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +l2:2:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +l3:3:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +l4:4:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +l5:5:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +l6:6:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +ls:S:wait:/etc/init.d/rc | /sbin/btee a /var/log/init.msg +~~:S:wait:/sbin/sulogin + +# reboot when pressing ctrl + alt + del +ca:12345:ctrlaltdel:/sbin/shutdown -r now + +# ::: +1:12345:respawn:/sbin/agetty -L -i -I '\012\015\012Maintenance Console:\012' 38400 vc/1 linux +2:12345:respawn:/sbin/agetty -f /etc/issue 38400 vc/2 linux +3:12345:respawn:/sbin/agetty -f /etc/issue 38400 vc/3 linux +4:12345:respawn:/sbin/agetty -f /etc/issue 38400 vc/4 linux +5:12345:respawn:/sbin/agetty -f /etc/issue 38400 vc/5 linux +6:12345:respawn:/sbin/agetty -f /etc/issue 38400 vc/6 linux diff --git a/misc/sysfiles/etc/issue b/misc/sysfiles/etc/issue new file mode 100644 index 0000000..f303922 --- /dev/null +++ b/misc/sysfiles/etc/issue @@ -0,0 +1,6 @@ + + +\t \d -- \U online -- line [\l]. + +welcome to \n (hdw-linux, Kernel \r). + diff --git a/misc/sysfiles/etc/ld.so.conf b/misc/sysfiles/etc/ld.so.conf new file mode 100644 index 0000000..1a81108 --- /dev/null +++ b/misc/sysfiles/etc/ld.so.conf @@ -0,0 +1,6 @@ +# hdw - linux /etc/ld.so.conf + +/usr/local/lib +/opt/*/lib + + diff --git a/misc/sysfiles/etc/networks b/misc/sysfiles/etc/networks new file mode 100644 index 0000000..1cdf99e --- /dev/null +++ b/misc/sysfiles/etc/networks @@ -0,0 +1,4 @@ +# hdw - linux /etc/networks +# + +loopback 127.0.0.0 diff --git a/misc/sysfiles/etc/nsswitch.conf b/misc/sysfiles/etc/nsswitch.conf new file mode 100644 index 0000000..0a56399 --- /dev/null +++ b/misc/sysfiles/etc/nsswitch.conf @@ -0,0 +1,20 @@ +# hdw - linux /etc/nsswitch.conf +# +# Example configuration of GNU Name Service Switch functionality. +# + +passwd: db files +group: db files +shadow: db files + +publickey: files + +hosts: files dns +networks: files dns + +protocols: db files +services: db files +ethers: db files +rpc: db files + +netgroup: db files diff --git a/misc/sysfiles/etc/passwd b/misc/sysfiles/etc/passwd new file mode 100644 index 0000000..db52cd4 --- /dev/null +++ b/misc/sysfiles/etc/passwd @@ -0,0 +1,5 @@ +root:x:0:0:root:/root:/bin/bash +toor:x:0:0:emergency root:/root:/bin/kiss +bin:x:1:1:bin:/bin:/bin/false +daemon:x:2:2:daemon:/sbin:/bin/false +nobody:x:65534:65534:nobody:/var/empty:/bin/false diff --git a/misc/sysfiles/etc/profile b/misc/sysfiles/etc/profile new file mode 100644 index 0000000..d60a22a --- /dev/null +++ b/misc/sysfiles/etc/profile @@ -0,0 +1,82 @@ +# hdw - linux /etc/profile (copied from ROCK Linux) +# + +# set the PATH-variable + +if [ -w / ] ; then + PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" + for x in /usr/X11/sbin /usr/X11/bin /usr/games /usr/local/games \ + /opt/*/sbin /opt/*/bin $HOME/sbin $HOME/bin + do + [ -d $x ] && export PATH="$PATH:$x" + done +else + PATH='/bin:/usr/bin:/usr/local/bin' + for x in /usr/X11/bin /usr/games /usr/local/games /opt/*/bin $HOME/bin + do + [ -d $x ] && export PATH="$PATH:$x" + done +fi +export PATH + +# set the prompts for bash and ksh + +if [ ".$BASH" != . ] ; then + export PS1='\u@\h:\w\$ ' + export PS2='> ' ; export PS4='+ ' +elif [ ".$KSH_VERSION" != . ] ; then + [ -w / ] && PS1='$USER:$PWD# ' || PS1='$USER:$PWD$ ' + export PS2='> ' ; export PS4='+ ' +fi + +# set some enviroment-variables + +if [ ".$SHELL" = "./bin/sh" ] ; then + export "SHELL=/bin/bash" +fi + +export EDITOR="vi" +export PAGER="less" +export BLOCKSIZE=K + +# set the MANPATH variable + +MANPATH=/usr/share/man +for x in /usr/X11/man /usr/local/man /usr/local/share/man /opt/*/man +do [ -d $x ] && export MANPATH="$MANPATH:$x" ; done + +# set the INFOPATH variable + +INFOPATH=/usr/share/info +for x in /usr/X11/info /usr/local/info /usr/local/share/info /opt/*/info +do [ -d $x ] && export INFOPATH="$INFOPATH:$x" ; done + +# set colors for ls +eval `dircolors -b /etc/dircolors` + +# some usefull aliases (only if this is an interactive shell) + +if [ "$PS1" ] ; then + alias -- +='pushd .' + alias -- -='popd' + alias ..='cd ..' + alias ...='cd ../..' + + alias l="ll -a" + alias ll="ls -l" + if [ -w / ] ; then + alias ls="ls --color=auto -a" + else + alias ls="ls --color=auto" + fi + + alias which="type -p" + alias rehash="hash -r" +fi + +# include local profiles + +for x in /etc/profile.d/* /etc/conf/profile ; do + [ -f $x ] && . $x +done +unset x diff --git a/misc/sysfiles/etc/resolv.conf b/misc/sysfiles/etc/resolv.conf new file mode 100644 index 0000000..41fa8ac --- /dev/null +++ b/misc/sysfiles/etc/resolv.conf @@ -0,0 +1,9 @@ +# hdw - linux /etc/resolv.conf +# +# man 5 resolv.conf + +# search foobar.com foobar.net +nameserver 212.185.248.50 +nameserver 194.25.2.129 +nameserver 128.9.0.107 + diff --git a/misc/sysfiles/etc/shadow b/misc/sysfiles/etc/shadow new file mode 100644 index 0000000..de522d3 --- /dev/null +++ b/misc/sysfiles/etc/shadow @@ -0,0 +1,5 @@ +root:$1$/nG/sH1w$EdRqRG1pPyCzl61UayLxz1:12609:::::: +toor:*::::::: +bin:*::::::: +daemon:*::::::: +nobody:*::::::: diff --git a/misc/sysfiles/etc/shells b/misc/sysfiles/etc/shells new file mode 100644 index 0000000..24bdbd2 --- /dev/null +++ b/misc/sysfiles/etc/shells @@ -0,0 +1,7 @@ +/bin/true +/bin/bash +/bin/tcsh +/bin/csh +/bin/kiss +/bin/ksh +/bin/sh diff --git a/misc/sysfiles/etc/syslog.conf b/misc/sysfiles/etc/syslog.conf new file mode 100644 index 0000000..736bc2f --- /dev/null +++ b/misc/sysfiles/etc/syslog.conf @@ -0,0 +1,25 @@ +# hdw - linux /etc/syslog.conf +# +# man 8 syslogd +# man 8 syslog.conf +# + +# we use special file for authentification stuff +auth,authpriv.* -/var/log/auth.log + +# everything else to /var/log/sys.log +*.*;auth,authpriv.none -/var/log/sys.log + +# do more seperation +kern.* -/var/log/kern.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log +# every warning +*.warning -/var/log/warn.log + +# and we still want messages file :) +*.info -/var/log/messages + +# warn the users +*.emerg * + diff --git a/packages/base/00-copy-system-files/00-copy-system-files b/packages/base/00-copy-system-files/00-copy-system-files new file mode 100644 index 0000000..91f119d --- /dev/null +++ b/packages/base/00-copy-system-files/00-copy-system-files @@ -0,0 +1,64 @@ +# hdw - linux 00-copy-system-files package +# +# author: hackbard@hackdaworld.dyndns.org +# +# we don't need source +# [S] 2-17 +# [V] 0.1 + +custmain="1" + +custmain() { + # copy /etc configuration files + for i in ${hdw_home_dir}/misc/sysfiles/etc/*; do + if [ -f $i ]; then + cp -v $i $root/etc + chmod 644 $root/etc/`basename $i` + fi + done + + # permissions + chmod 600 $root/etc/shadow + chmod 755 $root/etc/initscript + chown 0:3 $root/etc/shadow + + # copy conf directory + cp -v ${hdw_home_dir}/misc/sysfiles/etc/conf/[!C]* $root/etc/conf + chmod 644 $root/etc/conf/* + + # creating fstab + echo "creating fstab ..." + for part in `cat /proc/swaps | grep '^/dev/' | awk '{ print $1 }'`; do + echo -e "${part}\tswap\t\tswap\tdefaults 0 0" >> \ + $root/etc/fstab + done + + # /etc/mtab + [ ! -s $root/etc/mtab ] && ln -sfv ../proc/mounts $root/etc/mtab + touch $root/etc/mtab + + # utmp, wtmp and btmp file + touch $root/var/run/utmp $root/var/log/{btmp,lastlog,wtmp} && + chmod 644 $root/var/run/utmp $root/var/log/{btmp,lastlog,wtmp} + + # compile and install btee (made from Clifford Wolf for + # ROCK Linux http://www.rocklinux.org) + pre_gcc="" ; [ "$hdw_use_dietlibc" = "1" ] && pre_gcc="diet" + $pre_gcc gcc -Wall -O2 $hdw_home_dir/misc/hdw-tools/btee.c -o \ + $root/sbin/btee + + # copy over hdw-get script + cp -v $hdw_home_dir/misc/hdw-tools/hdw-get $root/usr/bin + chown 0:0 $root/usr/bin/hdw-get + chmod 750 $root/usr/bin/hdw-get + # create /etc/hdw-get.conf + cat > $root/etc/hdw-get.conf <<-EOF +# hdw - linux hdw-get.conf file +# keep track of version, downloadlocation and chosen installation media +# +net_addr="http://hackdaworld.dyndns.org/download" +hdw_version="$hdw_version" +hdw_arch="$hdw_arch" ;hdw_arch_opt="${hdw_arch_ot}" +# bin_dir="${hdw_home_dir}/binaries/${hdw_arch}-${hdw_arch_opt}" +EOF + } diff --git a/packages/base/00-dirtree/00-dirtree b/packages/base/00-dirtree/00-dirtree new file mode 100644 index 0000000..b651afc --- /dev/null +++ b/packages/base/00-dirtree/00-dirtree @@ -0,0 +1,216 @@ +# hdw - linux 00-dirtree package +# +# author: hackbard@hackdaworld.dyndns.org> +# +# we don't need no source +# [S] 0-0 +# [V] 0.1 + +custmain="1" + +flist_path="$flist_path dev/ home/ mnt/ proc/ root/ tmp/ sys/" +flist_pruned="this_hopefully_never_exists" + +custmain() { + +# Create directory stage1 prefix ... +mkdir -p $root/${s1_prefix} +# Create directory bin ... +mkdir -p $root/bin +# Create directory boot ... +mkdir -p $root/boot +# Create directory dev ... +mkdir -p $root/dev +# Create directory etc ... +mkdir -p $root/etc +# Create directory etc/conf ... +mkdir -p $root/etc/conf +# Create directory etc/init.d ... +mkdir -p $root/etc/init.d +# Create directory etc/init.d/rcX.d ... +mkdir -p $root/etc/init.d/rcX.d +# Create directory etc/init.d/rc1.d ... +mkdir -p $root/etc/init.d/rc1.d +# Create directory etc/init.d/rc2.d ... +mkdir -p $root/etc/init.d/rc2.d +# Create directory etc/init.d/rc3.d ... +mkdir -p $root/etc/init.d/rc3.d +# Create directory etc/init.d/rc4.d ... +mkdir -p $root/etc/init.d/rc4.d +# Create directory etc/init.d/rc5.d ... +mkdir -p $root/etc/init.d/rc5.d +# Create directory etc/opt ... +mkdir -p $root/etc/opt +# Create directory etc/profile.d ... +mkdir -p $root/etc/profile.d +# Create directory etc/setup.d ... +mkdir -p $root/etc/setup.d +# Create directory home ... +mkdir -p $root/home +# Create directory lib ... +mkdir -p $root/lib +# Create directory lib/modules ... +mkdir -p $root/lib/modules +# Create directory mnt ... +mkdir -p $root/mnt +# Create directory opt ... +mkdir -p $root/opt +# Create directory proc ... +mkdir -p $root/proc +# Create directory sys ... +mkdir -p $root/sys +# Create directory root ... +mkdir -p $root/root +# Create directory sbin ... +mkdir -p $root/sbin +# Create directory tmp ... +mkdir -p $root/tmp +# Create directory usr ... +mkdir -p $root/usr +# Create directory usr/bin ... +mkdir -p $root/usr/bin +# Create directory usr/games ... +mkdir -p $root/usr/games +# Create directory usr/include ... +mkdir -p $root/usr/include +# Create directory usr/lib ... +mkdir -p $root/usr/lib +# Create directory usr/local ... +mkdir -p $root/usr/local +# Create directory usr/local/bin ... +mkdir -p $root/usr/local/bin +# Create directory usr/local/etc ... +mkdir -p $root/usr/local/etc +# Create directory usr/local/include ... +mkdir -p $root/usr/local/include +# Create directory usr/local/lib ... +mkdir -p $root/usr/local/lib +# Create directory usr/local/share ... +mkdir -p $root/usr/local/share +# Create directory usr/local/sbin ... +mkdir -p $root/usr/local/sbin +# Create directory usr/local/src ... +mkdir -p $root/usr/local/src +# Create directory usr/local/var ... +mkdir -p $root/usr/local/var +# Create directory usr/sbin ... +mkdir -p $root/usr/sbin +# Create directory usr/share ... +mkdir -p $root/usr/share +# Create directory usr/share/dict ... +mkdir -p $root/usr/share/dict +# Create directory usr/share/doc ... +mkdir -p $root/usr/share/doc +# Create directory usr/share/games ... +mkdir -p $root/usr/share/games +# Create directory usr/share/info ... +mkdir -p $root/usr/share/info +# Create directory usr/share/locale ... +mkdir -p $root/usr/share/locale +# Create directory usr/share/man ... +mkdir -p $root/usr/share/man +# Create directory usr/share/man/man1 ... +mkdir -p $root/usr/share/man/man1 +# Create directory usr/share/man/man2 ... +mkdir -p $root/usr/share/man/man2 +# Create directory usr/share/man/man3 ... +mkdir -p $root/usr/share/man/man3 +# Create directory usr/share/man/man4 ... +mkdir -p $root/usr/share/man/man4 +# Create directory usr/share/man/man5 ... +mkdir -p $root/usr/share/man/man5 +# Create directory usr/share/man/man6 ... +mkdir -p $root/usr/share/man/man6 +# Create directory usr/share/man/man7 ... +mkdir -p $root/usr/share/man/man7 +# Create directory usr/share/man/man8 ... +mkdir -p $root/usr/share/man/man8 +# Create directory usr/share/misc ... +mkdir -p $root/usr/share/misc +# Create directory usr/share/nls ... +mkdir -p $root/usr/share/nls +# Create directory usr/share/terminfo ... +mkdir -p $root/usr/share/terminfo +# Create directory usr/share/tmac ... +mkdir -p $root/usr/share/tmac +# Create directory usr/share/zoneinfo ... +mkdir -p $root/usr/share/zoneinfo +# Create directory usr/src ... +mkdir -p $root/usr/src +# Create directory var ... +mkdir -p $root/var +# Create directory var/account ... +mkdir -p $root/var/account +# Create directory var/adm ... +mkdir -p $root/var/adm +# Create directory var/adm/cksums ... +mkdir -p $root/var/adm/cksums +# Create directory var/adm/flists ... +mkdir -p $root/var/adm/flists +# Create directory var/adm/logs +mkdir -p $root/var/adm/logs +# Create directory var/adm/md5sums ... +mkdir -p $root/var/adm/md5sums +# Create directory var/adm/packages ... +mkdir -p $root/var/adm/packages +# Create directory var/adm/deps/{build,run} +mkdir -p $root/var/adm/deps/{build,run} +# Create directory var/cache ... +mkdir -p $root/var/cache +# Create directory var/games ... +mkdir -p $root/var/games +# Create directory var/lib ... +mkdir -p $root/var/lib +# Create directory var/lock ... +mkdir -p $root/var/lock +# Create directory var/log ... +mkdir -p $root/var/log +# Create directory var/mail ... +mkdir -p $root/var/mail +# Create directory var/opt ... +mkdir -p $root/var/opt +# Create directory var/run ... +mkdir -p $root/var/run +# Create directory var/spool ... +mkdir -p $root/var/spool +# Create directory var/spool/mqueue ... +mkdir -p $root/var/spool/mqueue +# Create directory var/state ... +mkdir -p $root/var/state +# Create directory var/state/misc ... +mkdir -p $root/var/state/misc +# Create directory var/tmp ... +mkdir -p $root/var/tmp +# Create directory var/yp ... +mkdir -p $root/var/yp +# Create symlink usr/doc (share/doc) ... +ln -fs share/doc $root/usr/doc +# Create symlink usr/include/asm (../src/linux/include/asm) ... OBSOLETE +# ln -fs ../src/linux/include/asm $root/usr/include/asm +# Create symlink usr/include/linux (../src/linux/include/linux) ... OBSOLETE +# ln -fs ../src/linux/include/linux $root/usr/include/linux +# Create symlink usr/info (share/info) ... +ln -fs share/info $root/usr/info +# Create symlink usr/man (share/man) ... +ln -fs share/man $root/usr/man +# Create symlink usr/opt (../opt) ... +ln -fs ../opt $root/usr/opt +# Create symlink usr/spool (../var/spool) ... +ln -fs ../var/spool $root/usr/spool +# Create symlink usr/spool/locks (../../var/lock) ... +ln -fs ../../var/lock $root/usr/spool/locks +# Create symlink usr/tmp (../var/tmp) ... +ln -fs ../var/tmp $root/usr/tmp +# Create symlink var/spool/mail (../mail) ... +ln -fs ../mail $root/var/spool/mail +# Create symlink var/state/pkgtool (../adm) ... +ln -fs ../adm $root/var/state/pkgtool +# Running chmod (0700) on root ... +chmod 0700 $root/root +# Running chmod (ugo=rwxt) on tmp ... +chmod ugo=rwxt $root/tmp +# Running chmod (ugo=rwxt) on var/mail ... +chmod ugo=rwxt $root/var/mail +# Running chmod (ugo=rwxt) on var/tmp ... +chmod ugo=rwxt $root/var/tmp + } diff --git a/packages/base/00-final-base-conf/00-final-base-conf b/packages/base/00-final-base-conf/00-final-base-conf new file mode 100644 index 0000000..b30ca18 --- /dev/null +++ b/packages/base/00-final-base-conf/00-final-base-conf @@ -0,0 +1,37 @@ +# hdw - linux 00-final-base-conf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# we don't need source +# [S] 2-17 +# [V] 0.1 + +custmain="1" + +custmain() { + # + # individual stuff! IMPROVE_ME !! + # + + # locale settings + cat > $root/etc/profile.d/locale <<-'EOF' +export LANG='de' +export LANGUAGE='de' +export LC_ALL='C' +EOF + + # timezone, how do we handle this .. ? -> FAI + ln -sfv ../usr/share/zoneinfo/Europe/Berlin $root/etc/localtime + + # keyboard, how do we handle this ..? -> FAI + ln -sfv \ + ../usr/share/kbd/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz \ + $root/etc/default.keymap + + # use shadow'ed passwords + if [ "$hdw_crossbuild" = "0" ] ; then + echo "enabling shadow passwords ..." + $root/usr/sbin/pwconv + $root/usr/sbin/grpconv + fi + } diff --git a/packages/base/00-init-conf/00-init-conf b/packages/base/00-init-conf/00-init-conf new file mode 100644 index 0000000..7e27a45 --- /dev/null +++ b/packages/base/00-init-conf/00-init-conf @@ -0,0 +1,106 @@ +# hdw - linux 00-int-conf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# we don't need source +# [S] 2-17 +# [V] 0.1 + +custmain="1" + +custmain() { + # check for minit/sysvinit + if [ ! -d $root/etc/minit ]; then + # copy init scripts + cp -v ${hdw_home_dir}/misc/sysfiles/etc/init.d/[!C]* \ + $root/etc/init.d + # linking in rc2.d + ((counter=0)); ((counter2=100)) + for i in sysklogd cron network nscd; do + ((counter+=10)); ((counter2-=10)) + ln -vfs ../$i $root/etc/init.d/rc2.d/S`echo $counter`$i + ln -vfs ../$i $root/etc/init.d/rc2.d/K`echo $counter2`$i + done + # symbolic link to sbin + ln -svf ../etc/init.d $root/sbin/init.d + else + # create minit files + mkdir -p $root/etc/minit/default + rm -f $root/etc/minit/default/depends + # trivial initis + for i in $confdir/*.init; do + create_init $i + echo "`basename $i | awk -F. '{ print $1 }'`" >> \ + $root/etc/minit/default/depends + done + # none trivial inits + for i in getty krng ofid clean klogd keymap; do + mkdir -p $root/etc/minit/$i + echo $i >> $root/etc/minit/default/depends + done + # clean + cat > $root/etc/minit/clean/run << EOF +#!/bin/bash +cp -f /dev/null /etc/mtab +rm -f /var/run/* /var/lock/* /var/lock/*/* +touch /var/run/utmp ; chmod 664 /var/run/utmp ; chown root.tty /var/run/utmp +EOF + touch $root/etc/minit/clean/sync + echo "mount" > $root/etc/minit/clean/depends + # klogd + cat > $root/etc/minit/klogd/run << EOF +#!/bin/bash +echo "writing /var/log/boot.msg ..." +klogd -f /var/log/boot.new -o +grep '.' < /var/log/boot.new > /var/log/boot.msg +rm /var/log/boot.new +EOF + touch $root/etc/minit/klogd/sync + # keymap + cat > $root/etc/minit/keymap/run << EOF +#!/bin/bash +echo "setting keyboard keymappings ..." +if [ -L /etc/default.keymap ] ; then + oldpwd="`pwd`" ; cd /etc + loadkeys `ls -l default.keymap | tr -s ' ' | cut -f11 -d' '` + cd "$oldpwd" ; unset oldpwd +elif [ -f /etc/default.keymap ] ; then + loadkeys /etc/default.keymap +else + echo "no /etc/default.keymap found, no keymap loaded." +fi +EOF + touch $root/etc/minit/keymap/sync + # ofid + cat > $root/etc/minit/ofid/run << EOF +#!/bin/bash +echo 'setting overflow uid and gid kernel parameters ...' +sysctl -w kernel.overflowuid=`id -u nobody` | tr -d '\n' +echo -n ', ' ; sysctl -w kernel.overflowgid=`id -g nobody` +EOF + # krng + cat > $root/etc/minit/krng/run << EOF +#!/bin/bash +echo "initializing kernel random number generator ..." +[ -f /var/state/random-seed ] && cat /var/state/random-seed >/dev/urandom +dd if=/dev/urandom of=/var/state/random-seed count=1 2> /dev/null +EOF + # getty's + # check for {f,a}getty + my_getty="agetty" getty_opt="-f /etc/issue 38400 vc/\$i linux" + if [ -f $root/sbin/fgetty ] ; then + echo "fyi: using fgetty ..." + my_getty="fgetty" + getty_opt="vc/\$i --noclear" + fi + for i in 1 2 3 4 5 6; do + mkdir -p $root/etc/minit/getty/$i + rm -f $root/etc/minit/getty/$i/{run,params,depends} + touch $root/etc/minit/getty/$i/respawn + for param in $getty_opt; do + echo "$param" >> $root/etc/minit/getty/$i/params + done + ln -sv $root/sbin/$my_getty $root/etc/minit/getty/$i/run + done + fi + } diff --git a/packages/base/00-init-conf/cron.init b/packages/base/00-init-conf/cron.init new file mode 100644 index 0000000..705847c --- /dev/null +++ b/packages/base/00-init-conf/cron.init @@ -0,0 +1,2 @@ +bin="cron" +sync_respawn="respawn" diff --git a/packages/base/00-init-conf/ctraltdel.init b/packages/base/00-init-conf/ctraltdel.init new file mode 100644 index 0000000..b30c0cd --- /dev/null +++ b/packages/base/00-init-conf/ctraltdel.init @@ -0,0 +1,4 @@ +bin=shutdown +path="$root/sbin" +params="-nfr now" +depends="shutdown" diff --git a/packages/base/00-init-conf/devfs.init b/packages/base/00-init-conf/devfs.init new file mode 100644 index 0000000..5ce22e7 --- /dev/null +++ b/packages/base/00-init-conf/devfs.init @@ -0,0 +1,3 @@ +bin="devfs" +path="/etc/conf" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/devfsd.init b/packages/base/00-init-conf/devfsd.init new file mode 100644 index 0000000..473a344 --- /dev/null +++ b/packages/base/00-init-conf/devfsd.init @@ -0,0 +1,4 @@ +bin="devfsd" +path="$root/sbin" +params="/dev" +sync_respawn="respawn" diff --git a/packages/base/00-init-conf/fsck.init b/packages/base/00-init-conf/fsck.init new file mode 100644 index 0000000..65b62e6 --- /dev/null +++ b/packages/base/00-init-conf/fsck.init @@ -0,0 +1,4 @@ +bin=fsck +path="$root/sbin" +params="-A -C -a -f" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/hostname.init b/packages/base/00-init-conf/hostname.init new file mode 100644 index 0000000..6e6089e --- /dev/null +++ b/packages/base/00-init-conf/hostname.init @@ -0,0 +1,3 @@ +bin="hostname" +path="$root/bin" +params="hdw" diff --git a/packages/base/00-init-conf/ifconfig.init b/packages/base/00-init-conf/ifconfig.init new file mode 100644 index 0000000..f0534c4 --- /dev/null +++ b/packages/base/00-init-conf/ifconfig.init @@ -0,0 +1,4 @@ +bin=ifconfig +path="$root/sbin" +params="eth0 192.168.10.20 netmask 255.255.255.0 up" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/ifconfiglo.init b/packages/base/00-init-conf/ifconfiglo.init new file mode 100644 index 0000000..f61b372 --- /dev/null +++ b/packages/base/00-init-conf/ifconfiglo.init @@ -0,0 +1,4 @@ +bin=ifconfig +path="$root/sbin" +params="lo 127.0.0.1 netmask 255.0.0.0 up" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/kernel.init b/packages/base/00-init-conf/kernel.init new file mode 100644 index 0000000..3f9efe5 --- /dev/null +++ b/packages/base/00-init-conf/kernel.init @@ -0,0 +1,3 @@ +bin="kernel" +path="/etc/conf" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/klogd.init b/packages/base/00-init-conf/klogd.init new file mode 100644 index 0000000..df98b9f --- /dev/null +++ b/packages/base/00-init-conf/klogd.init @@ -0,0 +1,2 @@ +use_pfh="1" +sync_respawn="respawn" diff --git a/packages/base/00-init-conf/mkshm.init b/packages/base/00-init-conf/mkshm.init new file mode 100644 index 0000000..cb153e6 --- /dev/null +++ b/packages/base/00-init-conf/mkshm.init @@ -0,0 +1,2 @@ +exec="mkdir -p /dev/shm" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mountdev.init b/packages/base/00-init-conf/mountdev.init new file mode 100644 index 0000000..e37b5b8 --- /dev/null +++ b/packages/base/00-init-conf/mountdev.init @@ -0,0 +1,4 @@ +bin=mount +path="$root/bin" +params="-v -n /dev" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mountfs.init b/packages/base/00-init-conf/mountfs.init new file mode 100644 index 0000000..20d96d9 --- /dev/null +++ b/packages/base/00-init-conf/mountfs.init @@ -0,0 +1,4 @@ +bin=mount +path="$root/bin" +params="-v -a -t nocoda,nfs" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mountproc.init b/packages/base/00-init-conf/mountproc.init new file mode 100644 index 0000000..e3c4d03 --- /dev/null +++ b/packages/base/00-init-conf/mountproc.init @@ -0,0 +1,4 @@ +bin=mount +path="$root/bin" +params="-v -n /proc" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mountro.init b/packages/base/00-init-conf/mountro.init new file mode 100644 index 0000000..e424269 --- /dev/null +++ b/packages/base/00-init-conf/mountro.init @@ -0,0 +1,4 @@ +bin=mount +path="$root/bin" +params="-n -o remount,ro" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mountrw.init b/packages/base/00-init-conf/mountrw.init new file mode 100644 index 0000000..873b33e --- /dev/null +++ b/packages/base/00-init-conf/mountrw.init @@ -0,0 +1,4 @@ +bin=mount +path="$root/bin" +params="-v -n -o remount,rw" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mountshm.init b/packages/base/00-init-conf/mountshm.init new file mode 100644 index 0000000..4099308 --- /dev/null +++ b/packages/base/00-init-conf/mountshm.init @@ -0,0 +1,4 @@ +bin=mount +path="$root/bin" +params="-v -n /dev/shm" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/mtab.init b/packages/base/00-init-conf/mtab.init new file mode 100644 index 0000000..66ed6f6 --- /dev/null +++ b/packages/base/00-init-conf/mtab.init @@ -0,0 +1,4 @@ +bin=cat +path="$root/bin" +params="$root/proc/mounts > $root/etc/mtab" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/route.init b/packages/base/00-init-conf/route.init new file mode 100644 index 0000000..b889eaf --- /dev/null +++ b/packages/base/00-init-conf/route.init @@ -0,0 +1,4 @@ +bin=route +path="$root/sbin" +params="add default gw 192.168.10.10 dev eth0" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/routelo.init b/packages/base/00-init-conf/routelo.init new file mode 100644 index 0000000..9bee037 --- /dev/null +++ b/packages/base/00-init-conf/routelo.init @@ -0,0 +1,4 @@ +bin=route +path="$root/sbin" +params="add -net 127.0.0.0 netmask 255.0.0.0 dev lo" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/swapon.init b/packages/base/00-init-conf/swapon.init new file mode 100644 index 0000000..486ace0 --- /dev/null +++ b/packages/base/00-init-conf/swapon.init @@ -0,0 +1,3 @@ +path="$root/sbin" +params="-a" +sync_respawn="sync" diff --git a/packages/base/00-init-conf/syslogd.init b/packages/base/00-init-conf/syslogd.init new file mode 100644 index 0000000..df98b9f --- /dev/null +++ b/packages/base/00-init-conf/syslogd.init @@ -0,0 +1,2 @@ +use_pfh="1" +sync_respawn="respawn" diff --git a/packages/base/00-small-base-conf/00-small-base-conf b/packages/base/00-small-base-conf/00-small-base-conf new file mode 100644 index 0000000..dfd3505 --- /dev/null +++ b/packages/base/00-small-base-conf/00-small-base-conf @@ -0,0 +1,37 @@ +# hdw - linux 00-small-base-conf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# we don't need source +# [S] 1-10 2-1 +# [V] 0.1 + +custmain="1" + +if [ "$hdw_status" = "1" ] ; then + custmain() { + for i in bash pwd cat stty; do + ln -sf ../$s1_prefix/bin/$i $root/bin/$i + done + ln -sf bash $root/bin/sh + ln -sf ../../$s1_prefix/bin/perl $root/usr/bin/perl + } +else + custmain() { + # changing ownership! + chown -R 0:0 $root/[!p]* + + # passwd & group file + cp -v ${hdw_home_dir}/misc/sysfiles/etc/passwd $root/etc + cp -v ${hdw_home_dir}/misc/sysfiles/etc/group $root/etc + cp -v ${hdw_home_dir}/misc/sysfiles/etc/shadow $root/etc + chmod 644 $root/etc/{passwd,group} + chmod 640 $root/etc/shadow && chown 0:0 $root/etc/shadow + + # we want mtab to be up2date + ln -fs /proc/mounts $root/etc/mtab + + # arbitary timezone needed for some packages to build properly + ln -sfv ../usr/share/zoneinfo/Europe/Berlin $root/etc/localtime + } +fi diff --git a/packages/base/autoconf/autoconf b/packages/base/autoconf/autoconf new file mode 100644 index 0000000..cf6139e --- /dev/null +++ b/packages/base/autoconf/autoconf @@ -0,0 +1,7 @@ +# hdw - linux autoconf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.59 +# [S] 2-11 +# [D] autoconf-2.59.tar.bz2 ftp://ftp.gnu.org/pub/gnu/autoconf/ diff --git a/packages/base/automake/automake b/packages/base/automake/automake new file mode 100644 index 0000000..ce3dcc2 --- /dev/null +++ b/packages/base/automake/automake @@ -0,0 +1,14 @@ +# hdw - linux automake package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.8.5 +# [S] 2-11 +# [D] automake-1.8.5.tar.bz2 ftp://ftp.gnu.org/pub/gnu/automake/ + +extra_ver="`echo $ver | awk -F. '{ print $1 "." $2 }'`" + +post_install() { + rm -f $root/usr/share/automake + ln -sf automake-${extra_ver} $root/usr/share/automake + } diff --git a/packages/base/bash/avoid_keypad_sigsev.patch b/packages/base/bash/avoid_keypad_sigsev.patch new file mode 100644 index 0000000..60337f8 --- /dev/null +++ b/packages/base/bash/avoid_keypad_sigsev.patch @@ -0,0 +1,33 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 2.05b +Patch-ID: bash205b-001 + +Bug-Reported-by: taviso@sdf.lonestar.org +Bug-Reference-ID: <200208021107.g72B723d021352@darkstar.example.net> +Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-August/004980.html + +Bug-Description: + +Bash goes into an infinite loop and eventually crashes with a SIGSEGV +when some keys on the numeric keypad are pressed, possibly in combination +with the shift key. + +Patch: + +*** ./lib/readline/bind.c Thu Jan 24 11:15:52 2002 +--- ./lib/readline/bind.c Wed Jul 31 09:11:18 2002 +*************** +*** 312,316 **** + and the function bound to `a' to be executed when the user + types `abx', leaving `bx' in the input queue. */ +! if (k.function /* && k.type == ISFUNC */) + { + map[ANYOTHERKEY] = k; +--- 312,316 ---- + and the function bound to `a' to be executed when the user + types `abx', leaving `bx' in the input queue. */ +! if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR)) + { + map[ANYOTHERKEY] = k; diff --git a/packages/base/bash/bash b/packages/base/bash/bash new file mode 100644 index 0000000..813e120 --- /dev/null +++ b/packages/base/bash/bash @@ -0,0 +1,23 @@ +# hdw - linux bash package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.05b +# [S] 1-7 2-11 +# [D] bash-2.05b.tar.gz ftp://ftp.gnu.org/pub/gnu/bash/ +# [D] bash-doc-2.05b.tar.gz ftp://ftp.gnu.org/pub/gnu/bash/ + +confopt="$confopt --without-bash-malloc" + +if [ "$hdw_status" = "1" ] ; then + post_install() { + ln -svf bash $prefix/bin/sh + } +fi + +if [ "$hdw_status" = "2" ] ; then + confopt=${confopt//--bindir* /--bindir=$root/bin } + post_install() { + ln -sf bash $root/bin/sh + } +fi diff --git a/packages/base/bash/no_space_append.patch b/packages/base/bash/no_space_append.patch new file mode 100644 index 0000000..be540e7 --- /dev/null +++ b/packages/base/bash/no_space_append.patch @@ -0,0 +1,58 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 2.05b +Patch-ID: bash205b-003 + +Bug-Reported-by: jan.q.bruun-andersen@posten.se +Bug-Reference-ID: +Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004789.html + +Bug-Description: + +In certain cases, Bash appends a space instead of a slash to a directory +name relative to the current directory when performing command name +completion. This affects partial completion of intermediate directory +names. + +Patch: + +*** ./bashline.c Tue May 7 15:52:42 2002 +--- ./bashline.c Sat Aug 3 11:40:16 2002 +*************** +*** 1045,1049 **** +--- 1045,1052 ---- + else + { ++ #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x)) ++ + matches = rl_completion_matches (text, command_word_completion_function); ++ + /* If we are attempting command completion and nothing matches, we + do not want readline to perform filename completion for us. We +*************** +*** 1053,1057 **** + if (matches == (char **)NULL) + rl_ignore_some_completions_function = bash_ignore_filenames; +! else if (matches[1] == 0 && *matches[0] != '/') + /* Turn off rl_filename_completion_desired so readline doesn't + append a slash if there is a directory with the same name +--- 1056,1060 ---- + if (matches == (char **)NULL) + rl_ignore_some_completions_function = bash_ignore_filenames; +! else if (matches[1] == 0 && CMD_IS_DIR(matches[0])) + /* Turn off rl_filename_completion_desired so readline doesn't + append a slash if there is a directory with the same name +*************** +*** 1062,1066 **** + conflict. */ + rl_filename_completion_desired = 0; +! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/') + /* There are multiple instances of the same match (duplicate + completions haven't yet been removed). In this case, all of +--- 1065,1069 ---- + conflict. */ + rl_filename_completion_desired = 0; +! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0])) + /* There are multiple instances of the same match (duplicate + completions haven't yet been removed). In this case, all of diff --git a/packages/base/bash/variable_expansion.patch b/packages/base/bash/variable_expansion.patch new file mode 100644 index 0000000..1487a89 --- /dev/null +++ b/packages/base/bash/variable_expansion.patch @@ -0,0 +1,41 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 2.05b +Patch-ID: bash205b-004 + +Bug-Reported-by: c.f.a.johnson@rogers.com +Bug-Reference-ID: +Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-August/005074.html + +Bug-Description: + +A bug in the bash variable expansion code causes leading blanks in a +variable's value to be ignored when computing its length. + +Patch: + +*** ./subst.c Mon Jun 24 07:59:45 2002 +--- ./subst.c Sat Aug 17 17:28:46 2002 +*************** +*** 1639,1647 **** + /* This performs word splitting and quoted null character removal on + STRING. */ +! #if 0 +! #define issep(c) ((separators)[1] ? (member ((c), separators)) : (c) == (separators)[0]) +! #else +! #define issep(c) ((separators)[1] ? isifs(c) : (c) == (separators)[0]) +! #endif + + WORD_LIST * +--- 1639,1646 ---- + /* This performs word splitting and quoted null character removal on + STRING. */ +! #define issep(c) \ +! (((separators)[0]) ? ((separators)[1] ? isifs(c) \ +! : (c) == (separators)[0]) \ +! : 0) + + WORD_LIST * + + diff --git a/packages/base/bash/vi_repeat.patch b/packages/base/bash/vi_repeat.patch new file mode 100644 index 0000000..25abb06 --- /dev/null +++ b/packages/base/bash/vi_repeat.patch @@ -0,0 +1,27 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 2.05b +Patch-ID: bash205b-002 + +Bug-Reported-by: rwhron@earthlink.net +Bug-Reference-ID: <20020724000454.GA15210@rushmore> (bug-bash) +Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004856.html + +Bug-Description: + +Repeating an edit in vi-mode with `.' does not work. + +Patch: + +*** ./lib/readline/readline.c Wed Mar 13 17:10:46 2002 +--- ./lib/readline/readline.c Tue Jul 30 17:46:44 2002 +*************** +*** 685,688 **** +--- 685,689 ---- + #if defined (VI_MODE) + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && ++ key != ANYOTHERKEY && + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); + diff --git a/packages/base/bdb/bdb b/packages/base/bdb/bdb new file mode 100644 index 0000000..e2f72d9 --- /dev/null +++ b/packages/base/bdb/bdb @@ -0,0 +1,18 @@ +# hdw - linux bdb4 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.2.52 +# [S] 2-7 +# [D] db-4.2.52.tar.gz http://sleepycat.com/update/snapshot/ + +srcdir="db-$ver" +make_conf="LIBSO_LIBS=-lpthread LIBXSO_LIBS=-lpthread" +install_conf="docdir=$docdir $install_conf" + +build_main() { + cd build_unix + ../dist/configure $confopt --enable-compat185 --enable-cxx && + make $make_conf && + make $install_conf install + } diff --git a/packages/base/bdb/lock.patch b/packages/base/bdb/lock.patch new file mode 100644 index 0000000..2a06fec --- /dev/null +++ b/packages/base/bdb/lock.patch @@ -0,0 +1,45 @@ +*** ./lock/lock.c.save 2004-01-30 10:48:33.000000000 -0800 +--- ./lock/lock.c 2004-01-30 10:55:58.000000000 -0800 +*************** +*** 2216,2226 **** + dp = (u_int8_t *)dp + \ + sizeof(db_pgno_t); \ + } while (0) +! #define COPY_OBJ(dp, obj) do { \ +! memcpy(dp, obj->data, obj->size); \ +! dp = (u_int8_t *)dp + \ +! ALIGN(obj->size, \ +! sizeof(u_int32_t)); \ + } while (0) + + #define GET_COUNT(dp, count) do { \ +--- 2216,2227 ---- + dp = (u_int8_t *)dp + \ + sizeof(db_pgno_t); \ + } while (0) +! #define COPY_OBJ(dp, obj) do { \ +! memcpy(dp, \ +! (obj)->data, (obj)->size); \ +! dp = (u_int8_t *)dp + \ +! ALIGN((obj)->size, \ +! sizeof(u_int32_t)); \ + } while (0) + + #define GET_COUNT(dp, count) do { \ +*************** +*** 2339,2345 **** + for (i = 0; i < nlocks; i = j) { + PUT_PCOUNT(dp, obj[i].ulen); + PUT_SIZE(dp, obj[i].size); +! COPY_OBJ(dp, obj); + lock = (DB_LOCK_ILOCK *)obj[i].data; + for (j = i + 1; j <= i + obj[i].ulen; j++) { + lock = (DB_LOCK_ILOCK *)obj[j].data; +--- 2340,2346 ---- + for (i = 0; i < nlocks; i = j) { + PUT_PCOUNT(dp, obj[i].ulen); + PUT_SIZE(dp, obj[i].size); +! COPY_OBJ(dp, &obj[i]); + lock = (DB_LOCK_ILOCK *)obj[i].data; + for (j = i + 1; j <= i + obj[i].ulen; j++) { + lock = (DB_LOCK_ILOCK *)obj[j].data; diff --git a/packages/base/bdb/mp.patch b/packages/base/bdb/mp.patch new file mode 100644 index 0000000..7bb09ab --- /dev/null +++ b/packages/base/bdb/mp.patch @@ -0,0 +1,36 @@ +*** ./mp/mp_fget.c.orig 25 Sep 2003 02:15:16 -0000 11.81 +--- ./mp/mp_fget.c 9 Dec 2003 19:06:28 -0000 11.82 +*************** +*** 440,446 **** + c_mp->stat.st_pages--; + alloc_bhp = NULL; + R_UNLOCK(dbenv, &dbmp->reginfo[n_cache]); +- MUTEX_LOCK(dbenv, &hp->hash_mutex); + + /* + * We can't use the page we found in the pool if DB_MPOOL_NEW +--- 440,445 ---- +*************** +*** 455,460 **** +--- 454,462 ---- + b_incr = 0; + goto alloc; + } ++ ++ /* We can use the page -- get the bucket lock. */ ++ MUTEX_LOCK(dbenv, &hp->hash_mutex); + break; + case SECOND_MISS: + /* +*** ./mp/mp_fput.c.orig 30 Sep 2003 17:12:00 -0000 11.48 +--- ./mp/mp_fput.c 13 Dec 2003 00:08:29 -0000 11.49 +*************** +*** 285,290 **** +--- 285,291 ---- + bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh)) + if (bhp->priority != UINT32_T_MAX && + bhp->priority > MPOOL_BASE_DECREMENT) ++ bhp->priority -= MPOOL_BASE_DECREMENT; + MUTEX_UNLOCK(dbenv, &hp->hash_mutex); + } + } diff --git a/packages/base/binutils/binutils b/packages/base/binutils/binutils new file mode 100644 index 0000000..ade55d3 --- /dev/null +++ b/packages/base/binutils/binutils @@ -0,0 +1,50 @@ +# hdw - linux binutils package + +# author: hackbard@hackdaworld.dyndns.org +# +## [V] 2.15 +# [V] 2.15.91.0.1 +# [S] 2-4 2-5 +## [D] binutils-2.15.tar.bz2 ftp://ftp.gnu.org/gnu/binutils/ +# [D] binutils-2.15.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/ + +libpath="/usr/lib:/lib" + +if [ "$priority" = "4" ] ; then + flist_path="$flist_path ${s1_prefix}/" + flist_pruned="$flist_pruned|specs" + custmain=1 + custmain() { + # install binutils linking against new libc + cd $root/tmp/src.binutils/binutils-build + make -C ld INSTALL=/${s1_prefix}/bin/install install + cd - + rm -rf $root/tmp/src.binutils + + # show new linker to gcc + SPECFILE="`gcc --print-file specs`" + sed -e "s@ /${s1_prefix}/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g" \ + -e "s@ /${s1_prefix}/lib/ld.so.1@ /lib/ld.so.1@g" \ + $SPECFILE > tempspecfile + mv tempspecfile $SPECFILE + unset SPECFILE + } +fi + +if [ "$priority" = "5" ] ; then + confopt="$confopt --enable-shared --disable-nls" + make_conf="tooldir=$root/usr" + install_conf="tooldir=$root/usr" + post_install() { + cp ../binutils-$ver/include/libiberty.h \ + $prefix/include + } + + build_main() { + mkdir -p ../binutils-build && + cd ../binutils-build && + ../binutils-${ver}/configure $confopt && + make $make_conf && + make $install_conf install + } +fi diff --git a/packages/base/bison/bison b/packages/base/bison/bison new file mode 100644 index 0000000..4b5d4ac --- /dev/null +++ b/packages/base/bison/bison @@ -0,0 +1,22 @@ +# hdw - linux bison package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.875d +# [S] 1-8 2-9 +# [D] bison-1.875d.tar.bz2 ftp://alpha.gnu.org/pub/gnu/bison/ +## [D] bison-1.50.tar.bz2 ftp://ftp.gnu.org/pub/gnu/bison/ +## [D] bison-1.875a.tar.bz2 ftp://ftp.tuniv.szczecin.pl/pub/Linux/alpha-gnu/bison/ + +post_install() { + if [ ! -f $prefix/bin/yacc ] ; then + cat > $prefix/bin/yacc <<- EOF +#!/bin/sh +# use 'bison -y' as yacc ... + +exec $prefix/bin/bison -y "\$@" + +EOF + chmod 755 $prefix/bin/yacc + fi + } diff --git a/packages/base/bzip2/bzip2 b/packages/base/bzip2/bzip2 new file mode 100644 index 0000000..c971118 --- /dev/null +++ b/packages/base/bzip2/bzip2 @@ -0,0 +1,27 @@ +# hdw - linux bzip2 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.2 +# [S] 1-3 2-12 +# [D] bzip2-1.0.2.tar.gz ftp://sources.redhat.com/pub/bzip2/v102/ + +e_ver=`echo $ver | awk -F. '{ print $1 "." $2 }'` + +if [ "$hdw_status" = "2" ] ; then + pre_install() { + make -f Makefile-libbz2_so + make clean + rm -f $prefix/bin/bz{cat,cmp,diff,grep,ip2*,less,more} + } + + post_install() { + cp bzip2-shared $root/bin/bzip2 && + cp -a libbz2.so* $root/lib && + ln -svf ../../lib/libbz2.so.${e_ver} $root/usr/lib/libbz2.so && + rm $root/usr/bin/{bunzip2,bzcat,bzip2} && + mv $root/usr/bin/{bzip2recover,bzless,bzmore} $root/bin && + ln -svf bzip2 $root/bin/bunzip2 && + ln -svf bzip2 $root/bin/bzcat + } +fi diff --git a/packages/base/coreutils/coreutils b/packages/base/coreutils/coreutils new file mode 100644 index 0000000..6b4ae98 --- /dev/null +++ b/packages/base/coreutils/coreutils @@ -0,0 +1,27 @@ +# hdw - linux coreutils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 5.2.1 +# [S] 1-2 2-6 +# [D] coreutils-5.2.1.tar.bz2 ftp://ftp.gnu.org/gnu/coreutils/ + +pre_install() { + # old syntax compatibility + export DEFAULT_POSIX2_VERSION="199209" + } + +if [ "$hdw_status" = "2" ] ; then + post_install() { + for i in basename cat chgrp chmod chown cp dd df \ + dir dircolors du date echo false head \ + install ln ls mkdir mkfifo mknod mv pwd \ + rm rmdir shred sync sleep stty su test \ + touch true uname vdir; do + [ -f $prefix/bin/$i ] && \ + mv $prefix/bin/$i $root/bin + done + ln -sf test $root/bin/[ + ln -sf ../../bin/install $prefix/bin + } +fi diff --git a/packages/base/coreutils/coreutils_dupes.patch b/packages/base/coreutils/coreutils_dupes.patch new file mode 100644 index 0000000..4256c84 --- /dev/null +++ b/packages/base/coreutils/coreutils_dupes.patch @@ -0,0 +1,292 @@ +--- coreutils-5.2.1.orig/Makefile.in 2004-03-27 15:05:45.000000000 +0000 ++++ coreutils-5.2.1/Makefile.in 2004-03-27 15:05:58.000000000 +0000 +@@ -127,7 +127,7 @@ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \ + $(top_srcdir)/m4/unlink-busy.m4 \ +- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \ ++ $(top_srcdir)/m4/unlocked-io.m4 \ + $(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \ + $(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimens.m4 \ + $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/utimes.m4 \ +--- coreutils-5.2.1.orig/README 2004-03-27 15:05:45.000000000 +0000 ++++ coreutils-5.2.1/README 2004-03-27 15:05:58.000000000 +0000 +@@ -9,11 +9,11 @@ + + [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd + df dir dircolors dirname du echo env expand expr factor false fmt fold +- ginstall groups head hostid hostname id join kill link ln logname ls ++ ginstall groups head hostid id join link ln logname ls + md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr + printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort + split stat stty su sum sync tac tail tee test touch tr true tsort tty +- uname unexpand uniq unlink uptime users vdir wc who whoami yes ++ uname unexpand uniq unlink users vdir wc who whoami yes + + See the file NEWS for a list of major changes in the current release. + +--- coreutils-5.2.1.orig/configure 2004-03-27 15:05:45.000000000 +0000 ++++ coreutils-5.2.1/configure 2004-03-27 15:05:58.000000000 +0000 +@@ -47462,8 +47462,7 @@ + echo "$as_me:$LINENO: result: $gnulib_cv_have_boot_time" >&5 + echo "${ECHO_T}$gnulib_cv_have_boot_time" >&6 + if test $gnulib_cv_have_boot_time = yes; then +- OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime\$(EXEEXT)" +- MAN="$MAN uptime.1" ++echo "uptime is surpressed" + fi + + +--- coreutils-5.2.1.orig/man/Makefile.in 2004-03-27 15:05:45.000000000 +0000 ++++ coreutils-5.2.1/man/Makefile.in 2004-03-27 15:05:58.000000000 +0000 +@@ -122,7 +122,7 @@ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \ + $(top_srcdir)/m4/unlink-busy.m4 \ +- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \ ++ $(top_srcdir)/m4/unlocked-io.m4 \ + $(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \ + $(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimens.m4 \ + $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/utimes.m4 \ +@@ -266,13 +266,13 @@ + basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \ + cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \ + echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 \ +- head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 \ ++ head.1 hostid.1 id.1 install.1 join.1 \ + link.1 ln.1 logname.1 \ + ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \ + paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \ + rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \ + su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \ +- tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \ ++ tty.1 uname.1 unexpand.1 uniq.1 unlink.1 users.1 vdir.1 wc.1 \ + who.1 whoami.1 yes.1 + + man_aux = $(dist_man_MANS:.1=.x) +@@ -535,11 +535,9 @@ + groups.1: $(common_dep) $(srcdir)/groups.x ../src/groups.sh + head.1: $(common_dep) $(srcdir)/head.x ../src/head.c + hostid.1: $(common_dep) $(srcdir)/hostid.x ../src/hostid.c +-hostname.1: $(common_dep) $(srcdir)/hostname.x ../src/hostname.c + id.1: $(common_dep) $(srcdir)/id.x ../src/id.c + install.1: $(common_dep) $(srcdir)/install.x ../src/install.c + join.1: $(common_dep) $(srcdir)/join.x ../src/join.c +-kill.1: $(common_dep) $(srcdir)/kill.x ../src/kill.c + link.1: $(common_dep) $(srcdir)/link.x ../src/link.c + ln.1: $(common_dep) $(srcdir)/ln.x ../src/ln.c + logname.1: $(common_dep) $(srcdir)/logname.x ../src/logname.c +@@ -588,7 +586,6 @@ + unexpand.1: $(common_dep) $(srcdir)/unexpand.x ../src/unexpand.c + uniq.1: $(common_dep) $(srcdir)/uniq.x ../src/uniq.c + unlink.1: $(common_dep) $(srcdir)/unlink.x ../src/unlink.c +-uptime.1: $(common_dep) $(srcdir)/uptime.x ../src/uptime.c + users.1: $(common_dep) $(srcdir)/users.x ../src/users.c + vdir.1: $(common_dep) $(srcdir)/vdir.x ../src/ls.c + wc.1: $(common_dep) $(srcdir)/wc.x ../src/wc.c +@@ -619,7 +616,7 @@ + check-x-vs-1: + PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ + t=ls-files.$$$$; \ +- (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ ++ (cd $(srcdir) && ls -1 *.x) | grep -v 'hostname.x' | grep -v 'uptime.x' | grep -v 'kill.x' | sed 's/\.x$$//' | $(ASSORT) > $$t; \ + echo $(dist_man_MANS) | tr -s ' ' '\n' | sed 's/\.1$$//' \ + | $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \ + rm $$t +--- coreutils-5.2.1.orig/src/Makefile.in 2004-03-27 15:05:45.000000000 +0000 ++++ coreutils-5.2.1/src/Makefile.in 2004-03-27 15:05:58.000000000 +0000 +@@ -16,7 +16,7 @@ + + + +-SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c ++SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c id.c join.c link.c ln.c logname.c $(ls_SOURCES) $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -40,7 +40,7 @@ + host_triplet = @host@ + EXTRA_PROGRAMS = chroot$(EXEEXT) df$(EXEEXT) hostid$(EXEEXT) \ + nice$(EXEEXT) pinky$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) \ +- uname$(EXEEXT) uptime$(EXEEXT) users$(EXEEXT) who$(EXEEXT) ++ uname$(EXEEXT) users$(EXEEXT) who$(EXEEXT) + bin_PROGRAMS = [$(EXEEXT) chgrp$(EXEEXT) chown$(EXEEXT) chmod$(EXEEXT) \ + cp$(EXEEXT) dd$(EXEEXT) dircolors$(EXEEXT) du$(EXEEXT) \ + ginstall$(EXEEXT) link$(EXEEXT) ln$(EXEEXT) dir$(EXEEXT) \ +@@ -56,8 +56,8 @@ + tail$(EXEEXT) tr$(EXEEXT) tsort$(EXEEXT) unexpand$(EXEEXT) \ + uniq$(EXEEXT) wc$(EXEEXT) basename$(EXEEXT) date$(EXEEXT) \ + dirname$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) expr$(EXEEXT) \ +- factor$(EXEEXT) false$(EXEEXT) hostname$(EXEEXT) id$(EXEEXT) \ +- kill$(EXEEXT) logname$(EXEEXT) pathchk$(EXEEXT) \ ++ factor$(EXEEXT) false$(EXEEXT) id$(EXEEXT) \ ++ logname$(EXEEXT) pathchk$(EXEEXT) \ + printenv$(EXEEXT) printf$(EXEEXT) pwd$(EXEEXT) seq$(EXEEXT) \ + sleep$(EXEEXT) tee$(EXEEXT) test$(EXEEXT) true$(EXEEXT) \ + tty$(EXEEXT) whoami$(EXEEXT) yes$(EXEEXT) $(am__EXEEXT_1) \ +@@ -151,7 +151,7 @@ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \ + $(top_srcdir)/m4/unlink-busy.m4 \ +- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \ ++ $(top_srcdir)/m4/unlocked-io.m4 \ + $(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \ + $(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimens.m4 \ + $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/utimes.m4 \ +@@ -320,11 +320,6 @@ + hostid_LDADD = $(LDADD) + hostid_DEPENDENCIES = ../lib/libfetish.a $(am__DEPENDENCIES_1) \ + ../lib/libfetish.a +-hostname_SOURCES = hostname.c +-hostname_OBJECTS = hostname.$(OBJEXT) +-hostname_LDADD = $(LDADD) +-hostname_DEPENDENCIES = ../lib/libfetish.a $(am__DEPENDENCIES_1) \ +- ../lib/libfetish.a + id_SOURCES = id.c + id_OBJECTS = id.$(OBJEXT) + id_LDADD = $(LDADD) +@@ -335,11 +330,6 @@ + join_LDADD = $(LDADD) + join_DEPENDENCIES = ../lib/libfetish.a $(am__DEPENDENCIES_1) \ + ../lib/libfetish.a +-kill_SOURCES = kill.c +-kill_OBJECTS = kill.$(OBJEXT) +-kill_LDADD = $(LDADD) +-kill_DEPENDENCIES = ../lib/libfetish.a $(am__DEPENDENCIES_1) \ +- ../lib/libfetish.a + link_SOURCES = link.c + link_OBJECTS = link.$(OBJEXT) + link_LDADD = $(LDADD) +@@ -574,9 +564,6 @@ + unlink_LDADD = $(LDADD) + unlink_DEPENDENCIES = ../lib/libfetish.a $(am__DEPENDENCIES_1) \ + ../lib/libfetish.a +-uptime_SOURCES = uptime.c +-uptime_OBJECTS = uptime.$(OBJEXT) +-uptime_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) + users_SOURCES = users.c + users_OBJECTS = users.$(OBJEXT) + users_LDADD = $(LDADD) +@@ -625,9 +612,9 @@ + @AMDEP_TRUE@ ./$(DEPDIR)/factor.Po ./$(DEPDIR)/false.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/fmt.Po ./$(DEPDIR)/fold.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/head.Po ./$(DEPDIR)/hostid.Po \ +-@AMDEP_TRUE@ ./$(DEPDIR)/hostname.Po ./$(DEPDIR)/id.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/id.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/install.Po ./$(DEPDIR)/join.Po \ +-@AMDEP_TRUE@ ./$(DEPDIR)/kill.Po ./$(DEPDIR)/lbracket.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/lbracket.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/link.Po ./$(DEPDIR)/ln.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/logname.Po ./$(DEPDIR)/ls-dir.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/ls-ls.Po ./$(DEPDIR)/ls-vdir.Po \ +@@ -655,7 +642,7 @@ + @AMDEP_TRUE@ ./$(DEPDIR)/tsort.Po ./$(DEPDIR)/tty.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/uname.Po ./$(DEPDIR)/unexpand.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/uniq.Po ./$(DEPDIR)/unlink.Po \ +-@AMDEP_TRUE@ ./$(DEPDIR)/uptime.Po ./$(DEPDIR)/users.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/users.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/wc.Po ./$(DEPDIR)/who.Po \ + @AMDEP_TRUE@ ./$(DEPDIR)/whoami.Po ./$(DEPDIR)/yes.Po + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +@@ -666,29 +653,29 @@ + $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) \ + csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \ + dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \ +- fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c \ +- id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \ ++ fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c \ ++ id.c join.c link.c ln.c logname.c $(ls_SOURCES) \ + $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \ + nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \ + printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \ + rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \ + sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \ + tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \ +- unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \ ++ unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) \ + wc.c who.c whoami.c yes.c + DIST_SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c \ + $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) \ + csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \ + dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \ +- fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c \ +- id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \ ++ fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c \ ++ id.c join.c link.c ln.c logname.c $(ls_SOURCES) \ + $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \ + nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \ + printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \ + rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \ + sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \ + tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \ +- unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \ ++ unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) \ + wc.c who.c whoami.c yes.c + HEADERS = $(noinst_HEADERS) + ETAGS = etags +@@ -860,7 +847,6 @@ + + sleep_LDADD = $(nanosec_libs) + tail_LDADD = $(nanosec_libs) +-uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS) + su_LDADD = $(LDADD) $(LIB_CRYPT) + SUFFIXES = .sh + installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'` +@@ -1083,18 +1069,12 @@ + hostid$(EXEEXT): $(hostid_OBJECTS) $(hostid_DEPENDENCIES) + @rm -f hostid$(EXEEXT) + $(LINK) $(hostid_LDFLAGS) $(hostid_OBJECTS) $(hostid_LDADD) $(LIBS) +-hostname$(EXEEXT): $(hostname_OBJECTS) $(hostname_DEPENDENCIES) +- @rm -f hostname$(EXEEXT) +- $(LINK) $(hostname_LDFLAGS) $(hostname_OBJECTS) $(hostname_LDADD) $(LIBS) + id$(EXEEXT): $(id_OBJECTS) $(id_DEPENDENCIES) + @rm -f id$(EXEEXT) + $(LINK) $(id_LDFLAGS) $(id_OBJECTS) $(id_LDADD) $(LIBS) + join$(EXEEXT): $(join_OBJECTS) $(join_DEPENDENCIES) + @rm -f join$(EXEEXT) + $(LINK) $(join_LDFLAGS) $(join_OBJECTS) $(join_LDADD) $(LIBS) +-kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) +- @rm -f kill$(EXEEXT) +- $(LINK) $(kill_LDFLAGS) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(LINK) $(link_LDFLAGS) $(link_OBJECTS) $(link_LDADD) $(LIBS) +@@ -1242,9 +1222,6 @@ + unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(LINK) $(unlink_LDFLAGS) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) +-uptime$(EXEEXT): $(uptime_OBJECTS) $(uptime_DEPENDENCIES) +- @rm -f uptime$(EXEEXT) +- $(LINK) $(uptime_LDFLAGS) $(uptime_OBJECTS) $(uptime_LDADD) $(LIBS) + users$(EXEEXT): $(users_OBJECTS) $(users_DEPENDENCIES) + @rm -f users$(EXEEXT) + $(LINK) $(users_LDFLAGS) $(users_OBJECTS) $(users_LDADD) $(LIBS) +@@ -1333,11 +1310,9 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/head.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostid.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostname.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/install.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbracket.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ln.Po@am__quote@ +@@ -1393,7 +1368,6 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unexpand.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniq.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptime.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/users.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wc.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/who.Po@am__quote@ +@@ -1623,7 +1597,7 @@ + && can_create_suid_root_executable=yes; \ + rm -f $$TMPFILE; \ + if test $$can_create_suid_root_executable = yes; then \ +- $(INSTALL_SU); \ ++ echo "Installation of su is surpressed"; \ + else \ + echo "WARNING: insufficient access; not installing su"; \ + echo "NOTE: to install su, run 'make install-root' as root"; \ diff --git a/packages/base/coreutils/coreutils_uname.patch b/packages/base/coreutils/coreutils_uname.patch new file mode 100644 index 0000000..b2bdd18 --- /dev/null +++ b/packages/base/coreutils/coreutils_uname.patch @@ -0,0 +1,167 @@ +--- coreutils-5.2.0.orig/src/uname.c 2004-01-21 17:27:02.000000000 -0500 ++++ coreutils-5.2.0/src/uname.c 2004-03-02 00:25:26.508518048 -0500 +@@ -29,6 +29,12 @@ + # include + #endif + ++#ifdef linux ++#define cpuid(in,a,b,c,d)\ ++ asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in)); ++int has_sse( void ); ++#endif ++ + #if HAVE_SYSCTL && HAVE_SYS_SYSCTL_H + # include /* needed for OpenBSD 3.0 */ + # include +@@ -249,6 +252,96 @@ + if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) + element = processor; + } ++#else ++ { ++ struct utsname u; ++ uname (&u); ++ element = u.machine; ++#ifdef linux ++/****************************************************************************** ++ * ++ * Hello, major hack. I shouldn't have to do this. struct utsname should ++ * have another element with this info in it. There's probably a struct ++ * somewhere that has this info, I just don't know where it is. ++ * ++ *****************************************************************************/ ++ ++ if( !strcmp( element, "i586" ) || !strcmp( element, "i686" ) ) { ++ int eax, ebx, ecx, edx, unused; ++ int model, family, sse; ++ ++ cpuid(0,unused,ebx,ecx,edx); ++ cpuid(1,eax,unused,unused,unused); ++ model = (eax >> 4) & 0xf; ++ family = (eax >> 8) & 0xf; ++ ++ switch(ebx) { ++ case 0x756e6547: // Intel ++ switch( family ) { ++ case 5: // Pentium ++ if( model <= 3 ) ++ element="pentium"; ++ if( model > 3 ) ++ element="pentium-mmx"; ++ break; ++ case 6: // PentiumPro - Pentium III ++ if( model == 1 ) // Pentium Pro ++ element="pentiumpro"; ++ if( ( model == 3 ) || ( model == 5 ) || ++ ( model == 6 ) ) // Pentium II ++ element="pentium2"; ++ if( ( model == 7 ) || ( model == 8 ) || ++ ( model == 10 ) || ( model == 11 ) ) // These are all Pentium III ++ element="pentium3"; ++ break; ++ case 15: // Pentium4 ++ element="pentium4"; ++ break; ++ default: ++ break; ++ } // end switch( family ) ++ break; ++ case 0x68747541: // AMD ++ switch(family) { ++ case 5: ++ if( ( model == 0 ) || ( model == 1 ) || ++ ( model == 2 ) || ( model == 3 ) ) // K5 ++ element="i586"; ++ if( ( model == 6 ) || ( model == 7 ) ) // K6 ++ element="k6"; ++ if( model == 8 ) // K6-2 ++ element="k6-2"; ++ if( model == 9 ) // K6-3 ++ element="k6-3"; ++ break; ++ case 6: ++ if( model <= 4 ) ++ element="athlon"; ++ if( model > 4 ) { ++ sse = has_sse(); ++ if( sse == 0 ) ++ element="athlon"; ++ if( sse == 1 ) ++ element="athlon-4"; ++ } ++ break; ++ case 15: ++ element="athlon-4"; ++ break; ++ default: ++ break; ++ } // end switch( family ) ++ break; ++ case 0x69727943: // Cyrix ++ element="i386"; // who knows what cyrix supports, lets be safe ++ break; ++ default: ++ break; ++ } // end switch(ebx) ++ } ++ ++#endif ++ } + #endif + #ifdef UNAME_PROCESSOR + if (element == unknown) +@@ -265,7 +358,7 @@ + + if (toprint & PRINT_HARDWARE_PLATFORM) + { +- char const *element = unknown; ++ char *element = unknown; + #if HAVE_SYSINFO && defined SI_PLATFORM + { + static char hardware_platform[257]; +@@ -273,6 +366,15 @@ + hardware_platform, sizeof hardware_platform)) + element = hardware_platform; + } ++#else ++ { ++ struct utsname u; ++ uname (&u); ++ element = u.machine; ++ if (strlen (element) == 4 && element[0] == 'i' && element[2] == '8' ++ && element[3] == '6') ++ element[1] = '3'; ++ } + #endif + #ifdef UNAME_HARDWARE_PLATFORM + if (element == unknown) +@@ -294,3 +396,29 @@ + + exit (EXIT_SUCCESS); + } ++ ++#ifdef linux ++ ++/****************************************************************************** ++ * ++ * int has_sse( void ) ++ * Checks Athlon CPU's to see if they support SSE. ++ * ++ *****************************************************************************/ ++ ++int has_sse( void ) ++{ ++ unsigned long edx, unused; ++ int sse; ++ cpuid(1,unused,unused,unused,edx); ++ // I think, I need this tested on a Duron with SSE ++ // and one without it. ++ sse = edx & 0x2000000; ++ if( sse == 0 ) { ++ return 0; ++ } else { ++ return 1; ++ } ++ ++} ++#endif diff --git a/packages/base/cvs/cvs b/packages/base/cvs/cvs new file mode 100644 index 0000000..99a80cd --- /dev/null +++ b/packages/base/cvs/cvs @@ -0,0 +1,7 @@ +# hdw-linux cvs extensions +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.11.17 +# [S] 2-18 +# [D] cvs-1.11.17.tar.bz2 http://cougaar.org/frs/download.php/122/ diff --git a/packages/base/diffutils/diffutils b/packages/base/diffutils/diffutils new file mode 100644 index 0000000..c8a67b9 --- /dev/null +++ b/packages/base/diffutils/diffutils @@ -0,0 +1,7 @@ +# hdw - linux diffutils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.8.1 +# [S] 1-4 2-12 +# [D] diffutils-2.8.1.tar.gz ftp://ftp.gnu.org/pub/gnu/diffutils/ diff --git a/packages/base/e2fsprogs/e2fsprogs b/packages/base/e2fsprogs/e2fsprogs new file mode 100644 index 0000000..a565082 --- /dev/null +++ b/packages/base/e2fsprogs/e2fsprogs @@ -0,0 +1,17 @@ +# hdw - linux e2fsprogs package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.35 +# [S] 2-13 +# [D] e2fsprogs-1.35.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/e2fsprogs/ + +confopt="$confopt --with-root-prefix=\"$root\"" +confopt="$confopt --enable-elf-shlibs --disable-evms" + +build_main() { + mkdir ../e2fsprogs-build && + cd ../e2fsprogs-build && + ../e2fsprogs-$ver/configure $confopt + make && make install && make install-libs + } diff --git a/packages/base/ed/ed b/packages/base/ed/ed new file mode 100644 index 0000000..59b79c8 --- /dev/null +++ b/packages/base/ed/ed @@ -0,0 +1,13 @@ +# hdw - linux ed package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.2 +# [S] 2-11 +# [D] ed-0.2.tar.gz ftp://ftp.gnu.org/pub/gnu/ed/ + +confopt="--prefix=$prefix --build=$hdw_arch_build --host=$hdw_arch_target" + +post_install() { + mv $root/usr/bin/{ed,red} $root/bin + } diff --git a/packages/base/ed/ed_mkstemp.patch b/packages/base/ed/ed_mkstemp.patch new file mode 100644 index 0000000..c31132a --- /dev/null +++ b/packages/base/ed/ed_mkstemp.patch @@ -0,0 +1,19 @@ +--- ./buf.c.orig 2003-10-24 19:15:44.000000000 +0200 ++++ ./buf.c 2003-10-24 19:21:48.000000000 +0200 +@@ -200,13 +200,14 @@ + int + open_sbuf () + { +- char *mktemp (); + int u; ++ int sfd; + + isbinary = newline_added = 0; + u = umask(077); + strcpy (sfn, "/tmp/ed.XXXXXX"); +- if (mktemp (sfn) == NULL || (sfp = fopen (sfn, "w+")) == NULL) ++ sfd = mkstemp(sfn); ++ if ((sfd < 0) || (sfp = fopen (sfn, "w+")) == NULL) + { + fprintf (stderr, "%s: %s\n", sfn, strerror (errno)); + sprintf (errmsg, "Cannot open temp file"); diff --git a/packages/base/file/file b/packages/base/file/file new file mode 100644 index 0000000..ccbf18f --- /dev/null +++ b/packages/base/file/file @@ -0,0 +1,7 @@ +# hdw - linux file package +# +# author: hackdaworld.dyndns.org +# +# [V] 4.09 +# [S] 2-11 +# [D] file-4.09.tar.gz ftp://ftp.astron.com/pub/file/ diff --git a/packages/base/findutils/findutils b/packages/base/findutils/findutils new file mode 100644 index 0000000..d7f89ef --- /dev/null +++ b/packages/base/findutils/findutils @@ -0,0 +1,13 @@ +# hdw - linux findutils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.1.20 +# [S] 1-4 2-7 +# [D] findutils-4.1.20.tar.gz ftp://alpha.gnu.org/gnu/findutils/ + +if [ "$hdw_status" = "2" ] ; then + confopt=${confopt//--local* /--localstatedir=$root/var/lib/locate } + confopt="$confopt --libexecdir=$prefix/lib/locate" + mkdir -p $root/{usr,var}/lib/locate +fi diff --git a/packages/base/flex/debian_fixes.patch b/packages/base/flex/debian_fixes.patch new file mode 100644 index 0000000..64deb67 --- /dev/null +++ b/packages/base/flex/debian_fixes.patch @@ -0,0 +1,246 @@ +--- flex-2.5.31.orig/filter.c 2003-03-25 11:39:08.000000000 -0500 ++++ flex-2.5.31/filter.c 2004-03-01 23:14:28.868777672 -0500 +@@ -157,11 +157,15 @@ + if (chain->filter_func) { + int r; + +- /* setup streams again */ ++ /* setup streams again -- Removed. POSIX states that children inherit ++ open streams in the parent. Also, ANSI C99 states that the stdin ++ and stdout macors need not be modified lvalues; so this code is ++ broken in the first place. + if ((stdin = fdopen (0, "r")) == NULL) + flexfatal (_("fdopen(0) failed")); + if ((stdout = fdopen (1, "w")) == NULL) + flexfatal (_("fdopen(1) failed")); ++ */ + + if ((r = chain->filter_func (chain)) == -1) + flexfatal (_("filter_func failed")); +@@ -181,9 +185,11 @@ + if (dup2 (pipes[1], 1) == -1) + flexfatal (_("dup2(pipes[1],1)")); + close (pipes[1]); ++ /* This is not legal; stfout does not need to be a modifiable ++ lvalue + if ((stdout = fdopen (1, "w")) == NULL) + flexfatal (_("fdopen(1) failed")); +- ++ */ + return true; + } + +--- flex-2.5.31.orig/flex.skl 2003-03-31 20:51:38.000000000 -0500 ++++ flex-2.5.31/flex.skl 2004-03-01 23:14:28.870777368 -0500 +@@ -27,6 +27,11 @@ + %# Macros for runtime processing stage. + m4_changecom + m4_changequote ++ ++%# Let user use our quoting strings ++m4_changequote({, }) ++m4_define( {m4_userquote_start}, {m4_changequote(<, >)[[m4_changequote([[, ]])}) ++m4_define( {m4_userquote_end}, {m4_changequote(<, >)]]m4_changequote([[, ]])}) + m4_changequote([[, ]]) + + %# +@@ -345,19 +350,19 @@ + %# yyscan_t yyscanner; + %# + %# Generate traditional function defs +- m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) ++ m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\]] + M4_YY_DECL_LAST_ARG]]) +- m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) +- $1 $2; ++ m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\]] ++ $1 $2; [[\]] + M4_YY_DECL_LAST_ARG]]) +- m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) +- $1 $2; +- $3 $4; ++ m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\]] ++ $1 $2; [[\]] ++ $3 $4; [[\]] + M4_YY_DECL_LAST_ARG]]) +- m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) +- $1 $2; +- $3 $4; +- $5 $6; ++ m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\]] ++ $1 $2; [[\]] ++ $3 $4; [[\]] ++ $5 $6; [[\]] + M4_YY_DECL_LAST_ARG]]) + ]], + [[ +@@ -724,6 +729,7 @@ + + m4_ifdef( [[M4_YY_NO_UNISTD_H]],, + [[ ++#ifndef YY_NO_UNISTD_H + /* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. +@@ -734,6 +740,7 @@ + %if-c++-only + #include + %endif ++#endif + ]]) + + #ifndef YY_EXTRA_TYPE +@@ -1124,9 +1131,9 @@ + m4_dnl The bison pure parser is used. Redefine yylex to + m4_dnl accept the lval parameter. + +- m4_define( [[M4_YY_LEX_PROTO]], ++ m4_define( [[M4_YY_LEX_PROTO]], [[\]] + [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]]) +- m4_define( [[M4_YY_LEX_DECLARATION]], ++ m4_define( [[M4_YY_LEX_DECLARATION]], [[\]] + [[YYFARGS1(YYSTYPE *,yylval_param)]]) + ]]) + +@@ -1134,9 +1141,9 @@ + [[ + m4_dnl Locations are used. yylex should also accept the ylloc parameter. + +- m4_define( [[M4_YY_LEX_PROTO]], ++ m4_define( [[M4_YY_LEX_PROTO]], [[\]] + [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]]) +- m4_define( [[M4_YY_LEX_DECLARATION]], ++ m4_define( [[M4_YY_LEX_DECLARATION]], [[\]] + [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]]) + ]]) + +@@ -2251,11 +2258,11 @@ + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +-YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,str) ++YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,yy_str) + { + m4_dnl M4_YY_DECL_GUTS_VAR(); + +- return yy_scan_bytes( str, strlen(str) M4_YY_CALL_LAST_ARG); ++ return yy_scan_bytes( yy_str, strlen(yy_str) M4_YY_CALL_LAST_ARG); + } + %endif + ]]) +--- flex-2.5.31.orig/gen.c 2003-03-30 14:58:44.000000000 -0500 ++++ flex-2.5.31/gen.c 2004-03-01 23:14:28.862778584 -0500 +@@ -1812,7 +1812,6 @@ + if (yytext_is_array) { + if (!reentrant){ + indent_puts ("static int yy_more_offset = 0;"); +- }else{ + indent_puts ("static int yy_prev_more_offset = 0;"); + } + } +--- flex-2.5.31.orig/main.c 2003-03-31 20:51:38.000000000 -0500 ++++ flex-2.5.31/main.c 2004-03-01 23:14:28.863778432 -0500 +@@ -199,6 +199,7 @@ + { + #if ENABLE_NLS + setlocale (LC_MESSAGES, ""); ++ setlocale (LC_CTYPE, ""); + textdomain (PACKAGE); + bindtextdomain (PACKAGE, LOCALEDIR); + #endif +@@ -1595,7 +1596,6 @@ + outn ("#else"); + outn (yy_stdinit); + outn ("#endif"); +- outn ("#endif"); + } + + else { +--- flex-2.5.31.orig/scan.c 2003-04-01 11:33:17.000000000 -0500 ++++ flex-2.5.31/scan.c 2004-03-01 23:14:28.860778888 -0500 +@@ -1619,11 +1619,13 @@ + #define LINEDIR 18 + #define CODEBLOCK_MATCH_BRACE 19 + ++#ifndef YY_NO_UNISTD_H + /* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ + #include ++#endif + + #ifndef YY_EXTRA_TYPE + #define YY_EXTRA_TYPE void * +--- flex-2.5.31.orig/scan.l 2003-03-31 20:51:38.000000000 -0500 ++++ flex-2.5.31/scan.l 2004-03-01 23:14:28.864778280 -0500 +@@ -194,8 +194,14 @@ + { + "*/" ACTION_ECHO; yy_pop_state(); + "*" ACTION_ECHO; +- [^*\n]+ ACTION_ECHO; +- [^*\n]*{NL} ++linenum; ACTION_ECHO; ++ [\[\]] ACTION_ECHO; ++ [^*\[\]\n]+ ACTION_ECHO; ++ [^*\[\]\n]*{NL} ++linenum; ACTION_ECHO; ++ \[\[ add_action("[" "[]" "]m4_" "userquote_start()"); ++ \]\] add_action("[" "[]" "]m4_" "userquote_end()"); ++ /* Macros need to be clearly separated from surrounding ++ * text and this file needs to go through flex untouched. ++ */ + } + + { +--- flex-2.5.31.orig/skel.c 2003-04-01 11:33:08.000000000 -0500 ++++ flex-2.5.31/skel.c 2004-03-01 23:14:28.867777824 -0500 +@@ -404,16 +404,16 @@ + "%# yyscan_t yyscanner;", + "%#", + "%# Generate traditional function defs", +- " m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)", ++ " m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\\]]", + " M4_YY_DECL_LAST_ARG]])", +- " m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG)", ++ " m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\\]]", + " $1 $2;", + " M4_YY_DECL_LAST_ARG]])", +- " m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG)", ++ " m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\\]]", + " $1 $2;", + " $3 $4;", + " M4_YY_DECL_LAST_ARG]])", +- " m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG)", ++ " m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\\]]", + " $1 $2;", + " $3 $4;", + " $5 $6;", +@@ -783,6 +783,7 @@ + "", + "m4_ifdef( [[M4_YY_NO_UNISTD_H]],,", + "[[", ++ "#ifndef YY_NO_UNISTD_H", + "/* Special case for \"unistd.h\", since it is non-ANSI. We include it way", + " * down here because we want the user's section 1 to have been scanned first.", + " * The user has a chance to override it with an option.", +@@ -793,6 +794,7 @@ + "%if-c++-only", + "#include ", + "%endif", ++ "#endif", + "]])", + "", + "#ifndef YY_EXTRA_TYPE", +@@ -2454,11 +2456,11 @@ + " * @note If you want to scan bytes that may contain NUL values, then use", + " * yy_scan_bytes() instead.", + " */", +- "YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,str)", ++ "YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *,yy_str)", + "{", + " m4_dnl M4_YY_DECL_GUTS_VAR();", + "", +- " return yy_scan_bytes( str, strlen(str) M4_YY_CALL_LAST_ARG);", ++ " return yy_scan_bytes( yy_str, strlen(yy_str) M4_YY_CALL_LAST_ARG);", + "}", + "%endif", + "]])", diff --git a/packages/base/flex/flex b/packages/base/flex/flex new file mode 100644 index 0000000..b563c3b --- /dev/null +++ b/packages/base/flex/flex @@ -0,0 +1,17 @@ +# hdw - linux flex package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.5.31 +# [S] 1-8 2-9 +# [D] flex-2.5.31.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/lex/ + +pre_install() { + touch doc/flex.1 + } + +if [ "$hdw_status" = "2" ] ; then + post_install() { + ln -sfv libfl.a $prefix/lib/libl.a + } +fi diff --git a/packages/base/gawk/gawk b/packages/base/gawk/gawk new file mode 100644 index 0000000..c40264e --- /dev/null +++ b/packages/base/gawk/gawk @@ -0,0 +1,9 @@ +# hdw - linux gawk package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.1.3 +# [S] 1-1 2-7 +# [D] gawk-3.1.3.tar.bz2 ftp://ftp.gnu.org/pub/gnu/gawk/ + +[ "$hdw_status" = "2" ] && confopt="$confopt --libexecdir=$root/usr/lib" diff --git a/packages/base/gcc/gcc b/packages/base/gcc/gcc new file mode 100644 index 0000000..2f96fca --- /dev/null +++ b/packages/base/gcc/gcc @@ -0,0 +1,40 @@ +# hdw - linux gcc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.3.4 +# [S] 2-5 +# [D] gcc-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/ +# [D] gcc-g++-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/ +# [D] gcc-g77-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/ + +extraver="-${ver}" +[ "$ver" = "cvs" ] && extraver="" + +confopt="$confopt --enable-languages=c,c++,f77" +confopt="$confopt --enable-shared --enable-clocale=gnu" +confopt="$confopt --enable-threads=posix --enable-__cxa_atexit" +confopt="$confopt --libexecdir=$prefix/lib" + +# unset CFLAGS CXXFLAGS + +pre_install() { + echo "extracting c++ and fortran sources ..." + tar --use-compress-program=$compress -xvf $archdir/gcc-g++-3.3.4.tar.bz2 + tar --use-compress-program=$compress -xvf $archdir/gcc-g77-3.3.4.tar.bz2 + echo "patching source (libiberty) ..." + mv ./libiberty/Makefile.in ./tmp~ + sed 's%install_to_$(INSTALL_DEST) %%' ./tmp~ > ./libiberty/Makefile.in + } + +post_install() { + ln -sf ../usr/bin/cpp $root/lib && + ln -sf gcc $root/usr/bin/cc + } + +build_main() { + mkdir -p ../gcc-build && cd ../gcc-build + ../gcc${extraver}/configure $confopt + make + make install + } diff --git a/packages/base/gcc/no_fix_includes.patch b/packages/base/gcc/no_fix_includes.patch new file mode 100644 index 0000000..658f882 --- /dev/null +++ b/packages/base/gcc/no_fix_includes.patch @@ -0,0 +1,21 @@ +--- ./gcc/Makefile.in.orig 2004-06-30 15:35:15.000000000 +0200 ++++ ./gcc/Makefile.in 2004-06-30 15:36:23.000000000 +0200 +@@ -2341,10 +2341,6 @@ + rm -f include/limits.h + cp xlimits.h include/limits.h + chmod a+r include/limits.h +-# Install the README +- rm -f include/README +- cp $(srcdir)/README-fixinc include/README +- chmod a+r include/README + $(STAMP) $@ + + # fixinc.sh depends on this, not on specs directly. +@@ -2386,7 +2382,6 @@ + (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \ + SHELL='$(SHELL)' ;\ + export TARGET_MACHINE srcdir SHELL ; \ +- $(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \ + rm -f include/syslimits.h; \ + if [ -f include/limits.h ]; then \ + mv include/limits.h include/syslimits.h; \ diff --git a/packages/base/gcc/undef_gnu_src.patch.dietlibc b/packages/base/gcc/undef_gnu_src.patch.dietlibc new file mode 100644 index 0000000..ac4b141 --- /dev/null +++ b/packages/base/gcc/undef_gnu_src.patch.dietlibc @@ -0,0 +1,13 @@ +--- ./gcc/intl/loadmsgcat.c.orig 2003-01-25 18:12:35.000000000 +0100 ++++ ./gcc/intl/loadmsgcat.c 2003-01-25 18:14:01.000000000 +0100 +@@ -22,6 +22,10 @@ + #ifndef _GNU_SOURCE + # define _GNU_SOURCE 1 + #endif ++#ifdef _GNU_SOURCE ++# undef _GNU_SOURCE ++# define _BSD_SOURCE 1 ++#endif + + #ifdef HAVE_CONFIG_H + # include diff --git a/packages/base/gettext/gettext b/packages/base/gettext/gettext new file mode 100644 index 0000000..e7e8e68 --- /dev/null +++ b/packages/base/gettext/gettext @@ -0,0 +1,7 @@ +# hdw - linux gettext +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.14.1 +# [S] 2-10 +# [D] gettext-0.14.1.tar.gz ftp://ftp.gnu.org/pub/gnu/gettext/ diff --git a/packages/base/glibc/glibc b/packages/base/glibc/glibc new file mode 100644 index 0000000..9f78d6a --- /dev/null +++ b/packages/base/glibc/glibc @@ -0,0 +1,36 @@ +# hdw - linux glibc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 2-3 +## [D] glibc-2.3.2.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/ +# [D] glibc.tar.bz2 cvs:anoncvs:sources.redhat.com:cvs/glibc:libc + +srcdir=libc +extraver="-${ver}" +[ "$ver" = "cvs" ] && extraver="" + +confopt="$confopt --enable-add-ons=nptl --disable-profile --with-tls" +confopt="$confopt --libexecdir=$root/tmp/pt_chown --without-cvs" +confopt="$confopt --with-headers=/${s1_prefix}/glibc-kernheaders" + +pre_install() { + echo "creating some files needed for build ..." + mkdir -p $prefix/etc + [ ! -f $root/etc/ld.so.conf ] && touch $root/etc/ld.so.conf + [ ! -c /dev/null ] && mknod -m 0666 /dev/null c 1 3 + echo "done (file creating)" + } + +build_main() { + # create and change to seperated build directory + mkdir -p ../glibc-build && + cd ../glibc-build + + # configure and prepare Makefile + ../${srcdir}${extraver}/configure $confopt + + # build and install + make && make install && make localedata/install-locales + } diff --git a/packages/base/grep/grep b/packages/base/grep/grep new file mode 100644 index 0000000..eeeda07 --- /dev/null +++ b/packages/base/grep/grep @@ -0,0 +1,11 @@ +# hdw - linux grep package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.5 +# [S] 1-5 2-13 +# [D] grep-2.5.tar.bz2 ftp://ftp.gnu.org/pub/gnu/grep/ + +confopt="$confopt --with-included-regex" +[ "$hdw_status" = "1" ] && confopt="$confopt --disable-perl-regexp" +[ "$hdw_status" = "2" ] && confopt=${confopt//--bindir* /--bindir=$root/bin } diff --git a/packages/base/groff/groff b/packages/base/groff/groff new file mode 100644 index 0000000..315a1a8 --- /dev/null +++ b/packages/base/groff/groff @@ -0,0 +1,13 @@ +# hdw - linux groff package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.19.1 +# [S] 2-9 +# [D] groff-1.19.1.tar.gz ftp://ftp.gnu.org/pub/gnu/groff/ + +post_install() { + ln -sfv soelim $prefix/bin/zsoelim && + ln -sfv eqn $prefix/bin/geqn && + ln -sfv tbl $prefix/bin/gtbl + } diff --git a/packages/base/gzip/gzip b/packages/base/gzip/gzip new file mode 100644 index 0000000..2d83668 --- /dev/null +++ b/packages/base/gzip/gzip @@ -0,0 +1,30 @@ +# hdw - linux gzip package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.3.5 +# [S] 1-3 2-13 +# [D] gzip-1.3.5.tar.gz ftp://alpha.gnu.org/gnu/gzip/ + +if [ "$hdw_status" = "2" ] ; then + +build_main() { + ./configure $confopt + + # modify gzexe.in + cp gzexe.in gzexe.in.backup && + sed "s%"BINDIR"%$root/bin%" gzexe.in.backup > gzexe.in && + + # build and install + make && make install + } + +post_install() { + mv $root/usr/bin/gzip $root/bin && + rm $root/usr/bin/{gunzip,zcat} && + ln -sf gzip $root/bin/gunzip && + ln -sf gzip $root/bin/zcat && + ln -sf gunzip $root/bin/uncompress + } + +fi diff --git a/packages/base/hotplug/hotplug b/packages/base/hotplug/hotplug new file mode 100644 index 0000000..f6ae0dc --- /dev/null +++ b/packages/base/hotplug/hotplug @@ -0,0 +1,7 @@ +# hdw - linux hotplug package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2004_04_01 +# [S] 2-7 +# [D] hotplug-2004_04_01.tar.bz2 http://www.kernel.org/pub/linux/utils/kernel/hotplug/ diff --git a/packages/base/kbd/kbd b/packages/base/kbd/kbd new file mode 100644 index 0000000..f63a10f --- /dev/null +++ b/packages/base/kbd/kbd @@ -0,0 +1,9 @@ +# hdw - linux kdb package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.12 +# [S] 2-12 +# [D] kbd-1.12.tar.bz2 http://ftp.kernel.org/pub/linux/utils/kbd/ + +confopt="" diff --git a/packages/base/less/less b/packages/base/less/less new file mode 100644 index 0000000..7d00719 --- /dev/null +++ b/packages/base/less/less @@ -0,0 +1,9 @@ +# hdw - linux less package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 382 +# [S] 2-9 +# [D] less-382.tar.gz ftp://ftp.gnu.org/pub/gnu/less/ + +confopt=${confopt//--bindir* /--bindir=$root/bin } diff --git a/packages/base/libtool/libtool b/packages/base/libtool/libtool new file mode 100644 index 0000000..c6c72cd --- /dev/null +++ b/packages/base/libtool/libtool @@ -0,0 +1,7 @@ +# hdw - linux libtool package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.5.6 +# [S] 2-11 +# [D] libtool-1.5.6.tar.gz ftp://ftp.gnu.org/pub/gnu/libtool/ diff --git a/packages/base/linux-libc-headers/linux-libc-headers b/packages/base/linux-libc-headers/linux-libc-headers new file mode 100644 index 0000000..d7d812a --- /dev/null +++ b/packages/base/linux-libc-headers/linux-libc-headers @@ -0,0 +1,17 @@ +# hdw - linux base linux-libc-headers package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.6.7.0 +# [S] 2-2 +# [D] linux-libc-headers-2.6.7.0.tar.bz2 http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ + +arch=${hdw_arch//ia32/i386} + +build_main() { + cp -R include/asm-${arch} $prefix/include/asm + cp -R include/linux $prefix/include + chown -R root.root $prefix/include/{asm,linux} + find $prefix/include/{asm,linux} -type d -exec chmod 755 {} \; + find $prefix/include/{asm,linux} -type f -exec chmod 644 {} \; + } diff --git a/packages/base/linux/linux b/packages/base/linux/linux new file mode 100644 index 0000000..7d9029e --- /dev/null +++ b/packages/base/linux/linux @@ -0,0 +1,56 @@ +# hdw - linux linux package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.6.7 +# [S] 2-2 +# [D] linux-2.6.7.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ + +custmain="1" +custmain() { + # prepare src + cd $root/usr/src + rm -rf linux* + tar --use-compress-program=$compress -xvf $archdir/$pkg + mv linux-${ver} linux-${ver}-hdw && ln -s linux-$ver-hdw linux + chown -R root.root linux-${ver}-hdw + mkdir -p kernel + cp -v $archdir/$pkg kernel/ + cp -v $hdw_home_dir/misc/arch/$hdw_arch/linux.config \ + kernel/${package}-${ver}.config + cd linux + + # modify Makefile + if [ "$hdw_crossbuild" != "0" ] ; then + sed -e "s,^ARCH.*,ARCH = ${hdw_arch//ia32/i386}," \ + -e "s,^CROSS_COMPILE.*,CROSS_COMPILE = $hdw_arch_target-," \ + Makefile > M.tmp + mv M.tmp Makefile + fi + + # build + echo "mrproper, version, autoconf ..." + make mrproper + echo "copy .config ..." + cp -v $hdw_home_dir/misc/arch/$hdw_arch/linux.config .config + make include/linux/version.h && + make include/asm && + yes "" | make config + case "$hdw_arch" in + ia32) + make bzImage ; cp -v System.map $root/boot/ + cp -v arch/i386/boot/bzImage \ + $root/boot/vmlinuz_hdw ;; + sparc*) + make vmlinux ; cp -v System.map $root/boot/ + cp vmlinux $root/boot/vmlinuz_hdw ;; + *) + echo -e "\n !! not supported yet !!" + exit 1 ;; + esac + echo "modules, modules_install ..." + make modules && + make modules_install INSTALL_MOD_PATH=$root DEPMOD="true" + echo "try to build/install documentation ..." + make mandocs installmandocs + } diff --git a/packages/base/m4/m4 b/packages/base/m4/m4 new file mode 100644 index 0000000..bb91ed0 --- /dev/null +++ b/packages/base/m4/m4 @@ -0,0 +1,7 @@ +# hdw - linux m4 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.4.1 +# [S] 1-7 2-8 +# [D] m4-1.4.1.tar.gz ftp://ftp.gnu.org/pub/gnu/m4/ diff --git a/packages/base/make/make b/packages/base/make/make new file mode 100644 index 0000000..c5c362a --- /dev/null +++ b/packages/base/make/make @@ -0,0 +1,7 @@ +# hdw - linux make package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.80 +# [S] 1-4 2-14 +# [D] make-3.80.tar.bz2 ftp://ftp.gnu.org/pub/gnu/make/ diff --git a/packages/base/man-pages/man-pages b/packages/base/man-pages/man-pages new file mode 100644 index 0000000..46c745e --- /dev/null +++ b/packages/base/man-pages/man-pages @@ -0,0 +1,11 @@ +# hdw - linux man-pages package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.67 +# [S] 2-2 +# [D] man-pages-1.67.tar.bz2 ftp://ftp.kernel.org/pub/linux/docs/manpages/ + +build_main() { + make install + } diff --git a/packages/base/man/man b/packages/base/man/man new file mode 100644 index 0000000..c4d86f6 --- /dev/null +++ b/packages/base/man/man @@ -0,0 +1,9 @@ +# hdw - linux man package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.5m2 +# [S] 2-13 +# [D] man-1.5m2.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/man/ + +confopt="-confdir=$root/etc" diff --git a/packages/base/man/man_80cols.patch b/packages/base/man/man_80cols.patch new file mode 100644 index 0000000..a4c8713 --- /dev/null +++ b/packages/base/man/man_80cols.patch @@ -0,0 +1,14 @@ +diff -Naur man-1.5l.orig/src/man.c man-1.5l/src/man.c +--- man-1.5l.orig/src/man.c 2002-12-17 16:28:14.000000000 -0700 ++++ man-1.5l/src/man.c 2003-04-24 16:49:05.000000000 -0600 +@@ -546,7 +546,9 @@ + /* we should set line length and title line length */ + /* however, a .lt command here fails, only + .ev 1; .lt ...; .ev helps for my version of groff */ +- sprintf(eos(bufh), "echo \".ll %d.%di\"; ", ll/10, ll%10); ++ /* use the LL register instead of .ll to keep up with ++ * changes in the groff-1.18 series */ ++ sprintf(eos(bufh), "echo \".nr LL %d.%di\"; ", ll/10, ll%10); + #if 0 + sprintf(eos(bufh), "echo \".lt %d.%di\"; ", ll/10, ll%10); + #endif diff --git a/packages/base/man/man_manpath.patch b/packages/base/man/man_manpath.patch new file mode 100644 index 0000000..f46c3c1 --- /dev/null +++ b/packages/base/man/man_manpath.patch @@ -0,0 +1,12 @@ +diff -Naur man-1.5k.orig/src/man.conf.in man-1.5k/src/man.conf.in +--- man-1.5k.orig/src/man.conf.in 2002-07-17 13:08:40.000000000 -0600 ++++ man-1.5k/src/man.conf.in 2002-09-28 17:43:41.000000000 -0600 +@@ -36,7 +36,7 @@ + # + # Every automatically generated MANPATH includes these fields + # +-MANPATH /usr/man ++#MANPATH /usr/man + MANPATH /usr/share/man + MANPATH /usr/local/man + MANPATH /usr/X11R6/man diff --git a/packages/base/man/man_pager.patch b/packages/base/man/man_pager.patch new file mode 100644 index 0000000..fc10c4a --- /dev/null +++ b/packages/base/man/man_pager.patch @@ -0,0 +1,12 @@ +diff -Naur man-1.5l.orig/configure man-1.5l/configure +--- man-1.5l.orig/configure 2003-03-10 13:21:00.000000000 -0700 ++++ man-1.5l/configure 2003-04-24 16:50:30.000000000 -0600 +@@ -26,7 +26,7 @@ + # (Indeed, -r may cause the terminal to get into funny states. + # Very inconvenient. For viewing pages in strange locales, set LC_*.) + # +-DEFAULTLESSOPT="-is" ++DEFAULTLESSOPT="-isR" + # + # Note that not creating any cat directories (/var/cache/man or so) + # and not making man suid or sgid is recommended. diff --git a/packages/base/module-init-tools/module-init-tools b/packages/base/module-init-tools/module-init-tools new file mode 100644 index 0000000..c887d04 --- /dev/null +++ b/packages/base/module-init-tools/module-init-tools @@ -0,0 +1,16 @@ +# hdw - linux module-init-tools package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.0 +# [S] 2-15 +# [D] module-init-tools-3.0.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/ + +confopt=${confopt//--prefix* /--prefix="" } +confopt="$confopt --enable-zlib" + +post_install() { + # creating modprobe.* stuff + touch $root/etc/modprobe.conf + cp modprobe.devfs $root/etc + } diff --git a/packages/base/ncurses/ncurses b/packages/base/ncurses/ncurses new file mode 100644 index 0000000..17de59d --- /dev/null +++ b/packages/base/ncurses/ncurses @@ -0,0 +1,18 @@ +# hdw - linux ncurses package +# +# author: hackbard@hackdaworld.dndns.org +# +# [V] 5.4 +# [S] 1-6 2-7 +# [D] ncurses-5.4.tar.gz ftp://ftp.gnu.org/pub/gnu/ncurses/ + +confopt="$confopt --with-shared --without-debug" +[ "$hdw_status" = "1" ] && confopt="$confopt --without-ada --enable-overwrite" + +post_install() { + cd $prefix/lib && + chmod 755 *.${ver} + chmod 644 libncurses++.a + ln -sf libncurses.a libcurses.a + ln -sf libncurses.so libcurses.so + } diff --git a/packages/base/net-tools/gcc_34.patch b/packages/base/net-tools/gcc_34.patch new file mode 100644 index 0000000..50c0502 --- /dev/null +++ b/packages/base/net-tools/gcc_34.patch @@ -0,0 +1,67 @@ +--- net-tools-1.60.orig/hostname.c 2001-04-08 13:04:23.000000000 -0400 ++++ net-tools-1.60/hostname.c 2004-04-09 13:07:20.229598908 -0400 +@@ -98,6 +98,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ ((void)0); + } + exit(1); + }; +@@ -117,6 +118,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ ((void)0); + } + exit(1); + }; +@@ -174,6 +176,7 @@ + printf("%s\n", hp->h_name); + break; + default: ++ ((void)0); + } + } + +--- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 16:46:45.000000000 -0500 ++++ net-tools-1.60/lib/inet_sr.c 2004-04-09 13:07:20.229598908 -0400 +@@ -105,6 +105,7 @@ + case 2: + isnet = 0; break; + default: ++ ((void)0); + } + + /* Fill in the other fields. */ +--- net-tools-1.60.orig/mii-tool.c 2000-05-21 10:31:17.000000000 -0400 ++++ net-tools-1.60/mii-tool.c 2004-04-09 13:07:18.090313038 -0400 +@@ -379,17 +379,17 @@ + /*--------------------------------------------------------------------*/ + + const char *usage = +-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] +- -V, --version display version information +- -v, --verbose more verbose output +- -R, --reset reset MII to poweron state +- -r, --restart restart autonegotiation +- -w, --watch monitor for link status changes +- -l, --log with -w, write events to syslog +- -A, --advertise=media,... advertise only specified media +- -F, --force=media force specified media technology +-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, +- (to advertise both HD and FD) 100baseTx, 10baseT\n"; ++"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" ++" -V, --version display version information\n" ++" -v, --verbose more verbose output\n" ++" -R, --reset reset MII to poweron state\n" ++" -r, --restart restart autonegotiation\n" ++" -w, --watch monitor for link status changes\n" ++" -l, --log with -w, write events to syslog\n" ++" -A, --advertise=media,... advertise only specified media\n" ++" -F, --force=media force specified media technology\n" ++"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" ++" (to advertise both HD and FD) 100baseTx, 10baseT\n"; + + int main(int argc, char **argv) + { diff --git a/packages/base/net-tools/net-tools b/packages/base/net-tools/net-tools new file mode 100644 index 0000000..196f69b --- /dev/null +++ b/packages/base/net-tools/net-tools @@ -0,0 +1,28 @@ +# hdw - linux net-tools package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.60 +# [S] 2-8 +# [D] net-tools-1.60.tar.bz2 http://www.tazenda.demon.co.uk/phil/net-tools/ +# [D] iana-etc-1.00.tar.bz2 http://www.sethwklein.net/projects/iana-etc/downloads/ + +extraver=1.00 + +pre_install() { + mv lib/x25_sr.c lib/x25_sr.c.orig + sed 's%x25_address%struct &%' lib/x25_sr.c.orig > lib/x25_sr.c + } + +build_main() { + yes "" | make && + make update + } + +post_install() { + tar --use-compress-program=bzip2 -xvf \ + $archdir/iana-etc-${extraver}.tar.bz2 + cd iana-etc-${extraver} + make + make PREFIX="$root" install + } diff --git a/packages/base/netkit-base/netkit-base b/packages/base/netkit-base/netkit-base new file mode 100644 index 0000000..c356800 --- /dev/null +++ b/packages/base/netkit-base/netkit-base @@ -0,0 +1,32 @@ +# hdw - linux netkit-base package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.17 +# [S] 2-6 +# [D] netkit-base-0.17.tar.gz ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ + +confopt="" + +cat > $root/etc/inetd.conf << EOF +# +# hdw - linux inetd.conf +# +# man 8 inetd +# + +# +# These are standard services: +# + +# telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd +# talk dgram udp wait root /usr/sbin/in.talkd in.talkd +# ntalk dgram udp wait root /usr/sbin/in.talkd in.talkd +# ident stream tcp wait nobody /usr/sbin/in.identd in.identd -w -e -t120 + +# ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd +# rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon +# tftp dgram udp wait nobody /usr/sbin/in.tftpd in.tftpd /tftpboot +# imap stream tcp nowait root /usr/bin/imapd imapd +EOF + diff --git a/packages/base/netkit-base/netkit-base.init b/packages/base/netkit-base/netkit-base.init new file mode 100644 index 0000000..ddfbc16 --- /dev/null +++ b/packages/base/netkit-base/netkit-base.init @@ -0,0 +1,3 @@ +bin=inetd +run=inetd +s_value=35 diff --git a/packages/base/nvi/catman_sucks.patch b/packages/base/nvi/catman_sucks.patch new file mode 100644 index 0000000..94afd9a --- /dev/null +++ b/packages/base/nvi/catman_sucks.patch @@ -0,0 +1,11 @@ +--- ./Makefile.orig 2004-07-09 20:33:04.000000000 +0200 ++++ ./Makefile 2004-07-09 20:33:46.000000000 +0200 +@@ -30,7 +30,7 @@ + install -o root -g bin -m 555 bin/nvi $(BINDIR)/nvi + (cd $(BINDIR); ln -sf nvi nex) + install -o root -g root -m 444 USD.doc/vi.man/vi.1 $(MANDIR)/$(MANPREFIX)vi.1 +- install -o root -g root -m 444 USD.doc/vi.man/vi.0 $(CATMANDIR)/$(MANPREFIX)vi.1 ++ #install -o root -g root -m 444 USD.doc/vi.man/vi.0 $(CATMANDIR)/$(MANPREFIX)vi.1 + + clean: PORT/linux/Makefile + make -C PORT/linux $(MFLAGS) clean diff --git a/packages/base/nvi/errno.patch b/packages/base/nvi/errno.patch new file mode 100644 index 0000000..679d60c --- /dev/null +++ b/packages/base/nvi/errno.patch @@ -0,0 +1,128 @@ +--- ./ex/tag.h.orig 1995-01-31 18:59:16.000000000 +0100 ++++ ./ex/tag.h 2002-10-12 16:45:16.000000000 +0200 +@@ -38,7 +38,7 @@ + struct _tagf { /* Tag file. */ + TAILQ_ENTRY(_tagf) q; /* Linked list of tag files. */ + char *name; /* Tag file name. */ +- int errno; /* Error. */ ++ int errnum; /* Error. */ + + #define TAGF_ERR 0x01 /* Error occurred. */ + #define TAGF_ERR_WARN 0x02 /* Error reported. */ +--- ./ex/ex_tag.c.orig 2002-10-12 16:46:54.000000000 +0200 ++++ ./ex/ex_tag.c 2002-10-12 16:47:21.000000000 +0200 +@@ -727,7 +727,7 @@ + if (F_ISSET(tfp, TAGF_ERR) && + !F_ISSET(tfp, TAGF_ERR_WARN)) { + p = msg_print(sp, tfp->name, &nf1); +- errno = tfp->errno; ++ errno = tfp->errnum; + msgq(sp, M_SYSERR, "%s", p); + if (nf1) + FREE_SPACE(sp, p, 0); +@@ -815,7 +815,7 @@ + char *endp, *back, *front, *map, *p; + + if ((fd = open(tfp->name, O_RDONLY, 0)) < 0) { +- tfp->errno = errno; ++ tfp->errnum = errno; + return (1); + } + +@@ -830,7 +830,7 @@ + */ + if (fstat(fd, &sb) || (map = mmap(NULL, (size_t)sb.st_size, + PROT_READ, MAP_PRIVATE, fd, (off_t)0)) == (caddr_t)-1) { +- tfp->errno = errno; ++ tfp->errnum = errno; + (void)close(fd); + return (1); + } +--- ./PORT/db.1.85/hash/hash.h.orig 1994-06-24 17:12:29.000000000 +0200 ++++ ./PORT/db.1.85/hash/hash.h 2002-10-12 16:41:21.000000000 +0200 +@@ -103,7 +103,7 @@ + BUFHEAD *cpage; /* Current page */ + int cbucket; /* Current bucket */ + int cndx; /* Index of next item on cpage */ +- int errno; /* Error Number -- for DBM ++ int errnum; /* Error Number -- for DBM + * compatability */ + int new_file; /* Indicates if fd is backing store + * or no */ +--- ./PORT/db.1.85/hash/hash.c.orig 2002-10-12 16:27:14.000000000 +0200 ++++ ./PORT/db.1.85/hash/hash.c 2002-10-12 16:42:30.000000000 +0200 +@@ -505,7 +505,7 @@ + else + if (wsize != sizeof(HASHHDR)) { + errno = EFTYPE; +- hashp->errno = errno; ++ hashp->errnum = errno; + return (-1); + } + for (i = 0; i < NCACHED; i++) +@@ -536,7 +536,7 @@ + + hashp = (HTAB *)dbp->internal; + if (flag) { +- hashp->errno = errno = EINVAL; ++ hashp->errnum = errno = EINVAL; + return (ERROR); + } + return (hash_access(hashp, HASH_GET, (DBT *)key, data)); +@@ -553,11 +553,11 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_NOOVERWRITE) { +- hashp->errno = errno = EINVAL; ++ hashp->errnum = errno = EINVAL; + return (ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { +- hashp->errno = errno = EPERM; ++ hashp->errnum = errno = EPERM; + return (ERROR); + } + return (hash_access(hashp, flag == R_NOOVERWRITE ? +@@ -574,11 +574,11 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_CURSOR) { +- hashp->errno = errno = EINVAL; ++ hashp->errnum = errno = EINVAL; + return (ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { +- hashp->errno = errno = EPERM; ++ hashp->errnum = errno = EPERM; + return (ERROR); + } + return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL)); +@@ -729,7 +729,7 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_FIRST && flag != R_NEXT) { +- hashp->errno = errno = EINVAL; ++ hashp->errnum = errno = EINVAL; + return (ERROR); + } + #ifdef HASH_STATISTICS +--- ./PORT/db.1.85/hash/ndbm.c.orig 2002-10-12 19:48:03.000000000 +0200 ++++ ./PORT/db.1.85/hash/ndbm.c 2002-10-12 19:48:23.000000000 +0200 +@@ -180,7 +180,7 @@ + HTAB *hp; + + hp = (HTAB *)db->internal; +- return (hp->errno); ++ return (hp->errnum); + } + + extern int +@@ -190,7 +190,7 @@ + HTAB *hp; + + hp = (HTAB *)db->internal; +- hp->errno = 0; ++ hp->errnum = 0; + return (0); + } + diff --git a/packages/base/nvi/ncurses.patch b/packages/base/nvi/ncurses.patch new file mode 100644 index 0000000..60bc5c2 --- /dev/null +++ b/packages/base/nvi/ncurses.patch @@ -0,0 +1,31 @@ +--- ./PORT/linux/Makefile.orig 2003-10-20 22:28:45.000000000 +0200 ++++ ./PORT/linux/Makefile 2003-10-20 22:41:15.000000000 +0200 +@@ -42,19 +42,19 @@ + # To use the curses library included in the distribution, uncomment these + # lines. + # +-CDEF= -DDef_term=xDef_term -Dendwin=xendwin -Dttytype=xttytype +-CURSES=-Icurses +-OBJ12= addbytes.o addch.o addnstr.o box.o clear.o clrtobot.o clrtoeol.o \ +- cr_put.o ctrace.o cur_hash.o curses.o delch.o deleteln.o delwin.o \ +- erase.o fullname.o getch.o getstr.o id_subwins.o idlok.o initscr.o \ +- insch.o insertln.o longname.o move.o mvwin.o newwin.o overlay.o \ +- overwrite.o putchar.o refresh.o scroll.o setterm.o standout.o \ +- toucholap.o touchwin.o tscroll.o tstp.o tty.o unctrl.o ++#CDEF= -DDef_term=xDef_term -Dendwin=xendwin -Dttytype=xttytype ++#CURSES=-Icurses ++#OBJ12= addbytes.o addch.o addnstr.o box.o clear.o clrtobot.o clrtoeol.o \ ++# cr_put.o ctrace.o cur_hash.o curses.o delch.o deleteln.o delwin.o \ ++# erase.o fullname.o getch.o getstr.o id_subwins.o idlok.o initscr.o \ ++# insch.o insertln.o longname.o move.o mvwin.o newwin.o overlay.o \ ++# overwrite.o putchar.o refresh.o scroll.o setterm.o standout.o \ ++# toucholap.o touchwin.o tscroll.o tstp.o tty.o unctrl.o + + # To use the system's curses library, or to include additional + # routines from the system's curses library, uncomment this line. + # +-#CULIB= -lcurses ++CULIB= -lncurses + + # To use a System V curses interface with the system's curses library, + # uncomment this line. Using a System V curses library is dangerous. diff --git a/packages/base/nvi/no-machine-setting.patch b/packages/base/nvi/no-machine-setting.patch new file mode 100644 index 0000000..b301cf8 --- /dev/null +++ b/packages/base/nvi/no-machine-setting.patch @@ -0,0 +1,11 @@ +--- old/Makefile~ Thu Oct 28 09:15:53 1999 ++++ new/Makefile Thu Oct 28 09:18:40 1999 +@@ -6,7 +6,7 @@ + # + + CC = gcc +-CFLAGS = -O6 -fomit-frame-pointer -m486 -s -pipe ++CFLAGS = -O6 -fomit-frame-pointer -s -pipe + + BINDIR = /usr/bin + MANPREFIX = n diff --git a/packages/base/nvi/nvi b/packages/base/nvi/nvi new file mode 100644 index 0000000..f3da7e6 --- /dev/null +++ b/packages/base/nvi/nvi @@ -0,0 +1,25 @@ +# hdw - linux nvi package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.49-Linux +# [S] 2-7 +# [D] nvi.1.49-Linux.tgz ftp://metalab.unc.edu/pub/Linux/apps/editors/vi/ + +install_conf="CATMANDIR=$root/var/catman/cat1 $install_conf" + +pre_install() { + for i in `find ./ -name '[Mm]akefile' -type f`; do + echo "patching $i ..." + mv $i tmp~ + sed "s%/usr/local/%$prefix/%g" tmp~ > $i + done + make realclean + } + +post_install() { + for prog in vi ex; do + [ -f $prefix/bin/n${prog} ] && \ + ln -sfv n${prog} $prefix/bin/$prog + done + } diff --git a/packages/base/patch/patch b/packages/base/patch/patch new file mode 100644 index 0000000..bb675f9 --- /dev/null +++ b/packages/base/patch/patch @@ -0,0 +1,12 @@ +# hdw - linux patch package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.5.4 +# [S] 1-6 2-15 +# [D] patch-2.5.4.tar.gz ftp://ftp.gnu.org/pub/gnu/patch/ + + +pre_install() { + export CPPFLAGS=-D_GNU_SOURCE + } diff --git a/packages/base/perl/perl b/packages/base/perl/perl new file mode 100644 index 0000000..98285f4 --- /dev/null +++ b/packages/base/perl/perl @@ -0,0 +1,26 @@ +# hdw - linux perl package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 5.8.4 +# [S] 1-9 2-10 +# [D] perl-5.8.4.tar.gz ftp://ftp.cpan.org/pub/CPAN/src/ + +e_ver=`echo $ver | awk -F. '{ print $1 }'` +confopt="--prefix=$prefix -Dstatic_ext='IO Fcntl POSIX'" + +if [ "$hdw_status" = "1" ] ; then + build_main() { + ./configure.gnu $confopt + make perl utilities + cp perl pod/pod2man $prefix/bin + mkdir -p $prefix/lib/perl${e_ver}/$ver + cp -R lib/* $prefix/lib/perl${e_ver}/$ver + } +else + build_main() { + ./configure.gnu $confopt -Dpager="/bin/less -isR" && + make && + make install + } +fi diff --git a/packages/base/perl/perl_libc.patch.1 b/packages/base/perl/perl_libc.patch.1 new file mode 100644 index 0000000..085e2b7 --- /dev/null +++ b/packages/base/perl/perl_libc.patch.1 @@ -0,0 +1,22 @@ +--- perl-5.8.0.orig/hints/linux.sh 2002-06-05 23:46:00.000000000 +1000 ++++ perl-5.8.0/hints/linux.sh 2003-02-19 16:32:18.000000000 +1100 +@@ -51,9 +51,9 @@ + # We don't use __GLIBC__ and __GLIBC_MINOR__ because they + # are insufficiently precise to distinguish things like + # libc-2.0.6 and libc-2.0.7. +-if test -L /lib/libc.so.6; then +- libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'` +- libc=/lib/$libc ++if test -L ${prefix}/lib/libc.so.6; then ++ libc=`ls -l ${prefix}/lib/libc.so.6 | awk '{print $NF}'` ++ libc=${prefix}/lib/$libc + fi + + # Configure may fail to find lstat() since it's a static/inline +@@ -282,3 +282,6 @@ + ;; + esac + EOCBU ++locincpth="" ++loclibpth="" ++glibpth="${prefix}/lib" diff --git a/packages/base/procps/procps b/packages/base/procps/procps new file mode 100644 index 0000000..21f38f4 --- /dev/null +++ b/packages/base/procps/procps @@ -0,0 +1,11 @@ +# hdw - linux procps package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.2.1 +# [S] 2-15 +# [D] procps-3.2.1.tar.gz http://procps.sourceforge.net/ + +post_install() { + rm -f $root/lib/libproc.so + } diff --git a/packages/base/psmisc/psmisc b/packages/base/psmisc/psmisc new file mode 100644 index 0000000..2730eba --- /dev/null +++ b/packages/base/psmisc/psmisc @@ -0,0 +1,14 @@ +# hdw - linux psmisc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 21.5 +# [S] 2-15 +# [D] psmisc-21.5.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/psmisc/ + +confopt="$confopt --exec-prefix=$root/" + +post_install() { + ln -sfv pstree $prefix/bin/pstree.x11 + ln -sfv killall $root/bin/pidof + } diff --git a/packages/base/sed/permissions.patch.2 b/packages/base/sed/permissions.patch.2 new file mode 100644 index 0000000..222c15c --- /dev/null +++ b/packages/base/sed/permissions.patch.2 @@ -0,0 +1,10 @@ +--- sed-4.1.orig/sed/execute.c 2004-03-13 09:30:39.000000000 +0000 ++++ sed-4.1/sed/execute.c 2004-06-17 20:05:20.000000000 +0000 +@@ -668,6 +668,7 @@ + + input->in_file_name = name; + output_file.fp = ck_mkstemp (&input->out_file_name, tmpdir, "sed"); ++ output_fd = fileno(output_file.fp); + free (tmpdir); + + fstat (fileno (input->fp), &st); diff --git a/packages/base/sed/sed b/packages/base/sed/sed new file mode 100644 index 0000000..4da9559 --- /dev/null +++ b/packages/base/sed/sed @@ -0,0 +1,9 @@ +# hdw - linux sed package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.1 +# [S] 1-5 2-9 +# [D] sed-4.1.tar.gz ftp://ftp.gnu.org/pub/gnu/sed/ + +[ "$hdw_status" = "2" ] && confopt=${confopt//--bindir* /--bindir=$root/bin } diff --git a/packages/base/shadow/shadow b/packages/base/shadow/shadow new file mode 100644 index 0000000..cd2e5fc --- /dev/null +++ b/packages/base/shadow/shadow @@ -0,0 +1,30 @@ +# hdw - linux shadow package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.0.4.1 +# [S] 2-15 +# [D] shadow-4.0.4.1.tar.bz2 ftp://ftp.pld.org.pl/software/shadow/ + +confopt="$confopt --enable-shared" + +pre_install() { + echo '#define HAVE_SETLOCALE 1' >> config.h + cp libmisc/xmalloc.c libmisc/xmalloc.c.orig + sed '/extern char/d' libmisc/xmalloc.c.orig > libmisc/xmalloc.c + } + +post_install() { + cp etc/{limits,login.access} $root/etc && + sed -e 's%/var/spool/mail%/var/mail%' \ + -e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \ + etc/login.defs.linux > $root/etc/login.defs && + rm $root/bin/groups && + mv $root/bin/sg $prefix/bin && + mv $root/bin/vigr $prefix/sbin && + mv $prefix/passwd $root/bin && + mv $prefix/lib/lib{shadow,misc}.so.0* $root/lib + ln -sf ../../lib/libshadow.so.0 $prefix/lib/libshadow.so + ln -sf ../../lib/libmisc.so.0 $prefix/lib/libmisc.so + mkdir -p $root/etc/default + } diff --git a/packages/base/sysklogd/kernel_headers.patch b/packages/base/sysklogd/kernel_headers.patch new file mode 100644 index 0000000..97a03b5 --- /dev/null +++ b/packages/base/sysklogd/kernel_headers.patch @@ -0,0 +1,87 @@ +--- sysklogd-1.4.1-orig/Makefile 1998-10-12 20:25:15.000000000 +0000 ++++ sysklogd-1.4.1/Makefile 2003-08-17 19:14:38.000000000 +0000 +@@ -3,7 +3,7 @@ + CC= gcc + #CFLAGS= -g -DSYSV -Wall + #LDFLAGS= -g +-CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce ++CFLAGS= $(RPM_OPT_FLAGS) -DSYSV -D_GNU_SOURCE -Wall + LDFLAGS= -s + + # Look where your install program is. +--- sysklogd-1.4.1-orig/ksym_mod.c 2000-09-12 21:15:28.000000000 +0000 ++++ sysklogd-1.4.1/ksym_mod.c 2003-08-17 19:14:38.000000000 +0000 +@@ -93,7 +93,7 @@ + #include + #include + #else /* __GLIBC__ */ +-#include ++#include "module.h" + extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); + extern int get_kernel_syms __P ((struct kernel_sym *__table)); + #endif /* __GLIBC__ */ +--- sysklogd-1.4.1-orig/module.h 1970-01-01 00:00:00.000000000 +0000 ++++ sysklogd-1.4.1/module.h 2003-08-17 19:14:38.000000000 +0000 +@@ -0,0 +1,62 @@ ++/* this file eliminates the need to include */ ++/* Module definitions for klogd's module support */ ++struct kernel_sym ++{ ++ unsigned long value; ++ char name[60]; ++}; ++ ++struct module_symbol ++{ ++ unsigned long value; ++ const char *name; ++}; ++ ++struct module_ref ++{ ++ struct module *dep; /* "parent" pointer */ ++ struct module *ref; /* "child" pointer */ ++ struct module_ref *next_ref; ++}; ++ ++struct module_info ++{ ++ unsigned long addr; ++ unsigned long size; ++ unsigned long flags; ++ long usecount; ++}; ++ ++ ++typedef struct { volatile int counter; } atomic_t; ++ ++struct module ++{ ++ unsigned long size_of_struct; /* == sizeof(module) */ ++ struct module *next; ++ const char *name; ++ unsigned long size; ++ ++ union ++ { ++ atomic_t usecount; ++ long pad; ++ } uc; /* Needs to keep its size - so says rth */ ++ ++ unsigned long flags; /* AUTOCLEAN et al */ ++ ++ unsigned nsyms; ++ unsigned ndeps; ++ ++ struct module_symbol *syms; ++ struct module_ref *deps; ++ struct module_ref *refs; ++ int (*init)(void); ++ void (*cleanup)(void); ++ const struct exception_table_entry *ex_table_start; ++ const struct exception_table_entry *ex_table_end; ++#ifdef __alpha__ ++ unsigned long gp; ++#endif ++}; ++ diff --git a/packages/base/sysklogd/signal.patch b/packages/base/sysklogd/signal.patch new file mode 100644 index 0000000..3883ff2 --- /dev/null +++ b/packages/base/sysklogd/signal.patch @@ -0,0 +1,15 @@ +--- sysklogd-1.4.1.orig/syslogd.c 2001-03-11 19:40:10.000000000 +0000 ++++ sysklogd-1.4.1/syslogd.c 2003-11-19 16:03:11.376442834 +0000 +@@ -890,11 +890,11 @@ + dprintf("Checking pidfile.\n"); + if (!check_pid(PidFile)) + { ++ signal (SIGTERM, doexit); + if (fork()) { + /* + * Parent process + */ +- signal (SIGTERM, doexit); + sleep(300); + /* + * Not reached unless something major went wrong. 5 diff --git a/packages/base/sysklogd/sysklogd b/packages/base/sysklogd/sysklogd new file mode 100644 index 0000000..df0b4af --- /dev/null +++ b/packages/base/sysklogd/sysklogd @@ -0,0 +1,10 @@ +# hdw - linux sysklogd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.4.1 +# [S] 2-15 +# [D] sysklogd-1.4.1.tar.gz http://www.ibiblio.org/pub/Linux/system/daemons/ + +make_conf="" +install_conf="" diff --git a/packages/base/sysvinit/sysvinit b/packages/base/sysvinit/sysvinit new file mode 100644 index 0000000..60482fd --- /dev/null +++ b/packages/base/sysvinit/sysvinit @@ -0,0 +1,16 @@ +# hdw - linux sysvinit package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.85 +# [S] 2-15 +# [D] sysvinit-2.85.tar.gz ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/ + +pre_install() { + sed 's%Sending processes%& started by init%g' \ + src/init.c > tmp~ && + mv tmp~ src/init.c + } + +make_conf="-C src" +install_conf="-C src" diff --git a/packages/base/tar/tar b/packages/base/tar/tar new file mode 100644 index 0000000..892a89c --- /dev/null +++ b/packages/base/tar/tar @@ -0,0 +1,7 @@ +# hdw - linux tar package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.14 +# [S] 1-6 2-15 +# [D] tar-1.14.tar.bz2 ftp://ftp.gnu.org/pub/gnu/tar/ diff --git a/packages/base/termcap/termcap b/packages/base/termcap/termcap new file mode 100644 index 0000000..6ce3921 --- /dev/null +++ b/packages/base/termcap/termcap @@ -0,0 +1,11 @@ +# hdw - linux termcap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.3.1 +# [S] 2-6 +# [D] termcap-1.3.1.tar.gz ftp://ftp.gnu.org/pub/gnu/termcap/ + +confopt="--prefix=$prefix --build=$hdw_arch_build --host=$hdw_arch_target" +confopt="$confopt --enable-install-termcap" +make_conf="$make_conf termcapfile=$root/etc/termcap" diff --git a/packages/base/texinfo/texinfo b/packages/base/texinfo/texinfo new file mode 100644 index 0000000..90e9413 --- /dev/null +++ b/packages/base/texinfo/texinfo @@ -0,0 +1,14 @@ +# hdw - linux texinfo package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.7 +# [S] 1-6 2-10 +# [D] texinfo-4.7.tar.bz2 ftp://ftp.gnu.org/pub/gnu/texinfo/ + +if [ "$hdw_status" = "2" ] ; then + post_install() { + # TEXMF specifies root of textree (hopefully not an install loc) + make TEXMF=/usr/share/texmf install-tex + } +fi diff --git a/packages/base/udev/init_udev.sh b/packages/base/udev/init_udev.sh new file mode 100644 index 0000000..cc924df --- /dev/null +++ b/packages/base/udev/init_udev.sh @@ -0,0 +1,104 @@ +#!/bin/sh +# +# hdw - linux /etc/init.d/udev +# +# populate /dev directory with device nodes +# + +# read udev config +. /etc/udev/udev.conf + +prog=udev +sysfs_dir=/sys +bin=/sbin/udev +udevd=/sbin/udevd + +# add some nodes not exported by sysfs +run_udev() { + # block devices & partitions + for i in ${sysfs_dir}/block/*; do + export DEVPATH=${i#${sysfs_dir}} + $bin block & + for j in $i/*; do + if [ -f $j/dev ]; then + export DEVPATH=${j#${sysfs_dir}} + $bin block & + fi + done + done + # all other devices + for i in ${sysfs_dir}/class/*; do + for j in $i/*; do + if [ -f $j/dev ]; then + export DEVPATH=${j#${sysfs_dir}} + CLASS=`echo ${i#${sysfs_dir}} | \ + cut --delimeter='/' --fields=3-` + $bin $CLASS & + fi + done + done + return 0 + } + +add_nodes() { + ln -snf /proc/self/fd $udev_root/fd + ln -snf /proc/self/fd/0 $udev_root/stdin + ln -snf /proc/self/fd/1 $udev_root/stdout + ln -snf /proc/self/fd/2 $udev_root/stderr + ln -snf /proc/kcore $udev_root/core + + mkdir $udev_root/pts + mkdir $udev_root/shm +} + +# delete them when shutting down (not used right now) +del_nodes() { + rm $udev_root/{fd,stdin,stdout,stderr,core} +} + +# main procedures + +case "$1" +in + start) + echo -n "starting udev ..." + echo "/sbin/udev" > /proc/sys/kernel/hotplug + if [ ! -d $sysfs_dir/block ] ; then + echo "fatal: sysfs not mounted" + exit 1 + fi + rm -f $udev_root/.udev.tdb + export ACTION=add + export UDEV_NO_SLEEP=1 + run_udev + add_nodes + $udevd & + echo " done" + touch /var/lock/subsys/udev + ;; + stop) + echo -n "stopping udev ..." + export ACTION=remove + run_udev + del_nodes + echo " done" + rm /var/lock/subsys/udev + ;; + restart) + /etc/init.d/udev stop + /etc/init.d/udev start + ;; + status) + if [ -f /var/lock/subsys/udev ]; then + echo "udev running ..." + else + echo "udev not running ..." + fi + ;; + *) + echo "usage: $0 { start | stop | restart }" + exit 1 + ;; +esac + +exit 0 diff --git a/packages/base/udev/udev b/packages/base/udev/udev new file mode 100644 index 0000000..8169a38 --- /dev/null +++ b/packages/base/udev/udev @@ -0,0 +1,48 @@ +# hdw - linux udev package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 025 +# [S] 1-9 2-15 +# [D] udev-027.tar.bz2 http://www.kernel.org/pub/linux/utils/kernel/hotplug/ + +make_conf="udevdir=/dev $make_conf" +install_conf="udevdir=/dev" + +u_root=$root +[ "$hdw_status" = "1" ] && u_root=/${s1_prefix} + +if [ "$hdw_status" = "1" ] ; then + make_conf="prefix=$prefix etcdir=$prefix/etc $make_conf" + install_conf="DESTDIR=$prefix $install_conf" + pre_install() { + mv udevstart.c udevstart.c.orig + sed "s%/sbin/udev%$u_root/sbin/udev%g" udevstart.c.orig > \ + udevstart.c + mv etc/udev/udev.conf.in etc/udev/udev.conf.in.orig + sed "s%/etc%$u_root/etc%g" etc/udev/udev.conf.in.orig > \ + etc/udev/udev.conf.in + } +fi + +post_install() { + # subsys folder for locking + mkdir -p $root/var/lock/subsys + # documentation + rm -rf $docdir ; mkdir -p $docdir + cp -r docs FAQ HOWTO-udev_for_dev README* TODO $docdir + # config stuff + mkdir -p $u_root/etc/udev/{rules,permissions}.d + cp etc/udev/udev.rules* $u_root/etc/udev/rules.d/ + cp etc/udev/udev.permissions* $u_root/etc/udev/permissions.d/ + mv $u_root/etc/udev/rules.d/udev.rules{,.orig} + mv $u_root/etc/udev/permissions.d/udev.permissions{,.orig} + ln -svf udev.rules.devfs $u_root/etc/udev/rules.d/udev.rules + ln -svf udev.permissions.gentoo \ + $u_root/etc/udev/permissions.d/udev.permissions + # init script + if [ "$hdw_status" = "2" ] ; then + cp $confdir/init_udev.sh $u_root/etc/init.d/udev + chmod 750 $u_root/etc/init.d/udev + fi + } diff --git a/packages/base/util-linux/kernel_headers.patch b/packages/base/util-linux/kernel_headers.patch new file mode 100644 index 0000000..3ab82b0 --- /dev/null +++ b/packages/base/util-linux/kernel_headers.patch @@ -0,0 +1,83 @@ +--- util-linux-2.12.orig/disk-utils/blockdev.c 2002-03-08 22:57:02.000000000 +0000 ++++ util-linux-2.12/disk-utils/blockdev.c 2004-01-30 19:49:39.000000000 +0000 +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #include "nls.h" + +@@ -24,8 +25,13 @@ + #define BLKRASET _IO(0x12,98) + #define BLKRAGET _IO(0x12,99) + #define BLKSSZGET _IO(0x12,104) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define BLKBSZGET _IOR(0x12,112,sizeof(int)) + #define BLKBSZSET _IOW(0x12,113,sizeof(int)) ++#else ++#define BLKBSZGET _IOR(0x12,112,int) ++#define BLKBSZSET _IOW(0x12,113,int) ++#endif + #endif + + /* Maybe could be included */ +--- util-linux-2.12.orig/disk-utils/elvtune.c 2002-03-08 22:57:49.000000000 +0000 ++++ util-linux-2.12/disk-utils/elvtune.c 2004-01-30 19:49:39.000000000 +0000 +@@ -26,6 +26,8 @@ + #include + #include + #include ++#include ++ + #include "nls.h" + + /* this has to match with the kernel structure */ +@@ -37,8 +39,13 @@ + int max_bomb_segments; + } blkelv_ioctl_arg_t; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t)) + #define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t)) ++#else ++#define BLKELVGET _IOR(0x12,106,blkelv_ioctl_arg_t) ++#define BLKELVSET _IOW(0x12,107,blkelv_ioctl_arg_t) ++#endif + + static void + usage(void) { +--- util-linux-2.12.orig/fdisk/common.h 2003-07-13 13:59:53.000000000 +0000 ++++ util-linux-2.12/fdisk/common.h 2004-01-30 19:49:39.000000000 +0000 +@@ -2,11 +2,18 @@ + + /* including fails */ + #include ++#include ++ + #define BLKRRPART _IO(0x12,95) /* re-read partition table */ + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ + #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */ ++#else ++#define BLKGETSIZE64 _IOR(0x12,114,unsigned long long) ++#endif + + /* including also fails */ + struct hd_geometry { +--- util-linux-2.12.orig/mount/my_dev_t.h 2003-07-16 20:05:50.000000000 +0000 ++++ util-linux-2.12/mount/my_dev_t.h 2004-01-30 19:49:39.000000000 +0000 +@@ -4,4 +4,10 @@ + /* for ancient systems use "unsigned short" */ + + #include ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define my_dev_t __kernel_dev_t ++#else ++#define my_dev_t int ++#endif diff --git a/packages/base/util-linux/util-linux b/packages/base/util-linux/util-linux new file mode 100644 index 0000000..a5cf895 --- /dev/null +++ b/packages/base/util-linux/util-linux @@ -0,0 +1,36 @@ +# hdw - linux util-linux package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.12a +# [S] 1-8 2-15 +# [D] util-linux-2.12a.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/util-linux/ + +if [ "$hdw_status" = "1" ]; then + pre_install() { + cp configure configure.orig + sed "s%/usr/include%$prefix/include%g" configure.orig configure + chmod 755 configure + } + build_main() { + ./configure && + make -C lib && + make -C mount mount umount + make -C text-utils more + } + post_install() { + cp mount/{mount,umount} text-utils/more $prefix/bin + } +fi + +if [ "$hdw_status" = "2" ]; then + pre_install() { + sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \ + hwclock/hwclock.c > tmp~ && + mv tmp~ hwclock/hwclock.c && + mkdir -p $root/var/lib/hwclock + } +confopt="" +make_conf="HAVE_SLN=yes HAVE_KILL=yes" +install_conf="HAVE_SLN=yes HAVE_KILL=yes" +fi diff --git a/packages/base/wget/allow-tilde-in-url.patch b/packages/base/wget/allow-tilde-in-url.patch new file mode 100644 index 0000000..7cfa8b6 --- /dev/null +++ b/packages/base/wget/allow-tilde-in-url.patch @@ -0,0 +1,11 @@ +--- ./src/url.c.orig Sun May 27 21:35:10 2001 ++++ ./src/url.c Fri Jun 8 17:51:50 2001 +@@ -166,7 +166,7 @@ + U, 0, 0, 0, 0, 0, 0, 0, /* ` a b c d e f g */ + 0, 0, 0, 0, 0, 0, 0, 0, /* h i j k l m n o */ + 0, 0, 0, 0, 0, 0, 0, 0, /* p q r s t u v w */ +- 0, 0, 0, U, U, U, U, U, /* x y z { | } ~ DEL */ ++ 0, 0, 0, U, U, U, 0, U, /* x y z { | } ~ DEL */ + + U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, + U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, diff --git a/packages/base/wget/wget b/packages/base/wget/wget new file mode 100644 index 0000000..da44ba4 --- /dev/null +++ b/packages/base/wget/wget @@ -0,0 +1,8 @@ +# hdw-linux wget extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 1.9.1 + +# [S] 2-7 +# [D] wget-1.9.1.tar.gz ftp://ftp.gnu.org/pub/gnu/wget/ diff --git a/packages/base/zlib/zlib b/packages/base/zlib/zlib new file mode 100644 index 0000000..1e1037c --- /dev/null +++ b/packages/base/zlib/zlib @@ -0,0 +1,22 @@ +# hdw - linux zlib package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.1 +# [S] 2-6 +# [D] zlib-1.2.1.tar.bz2 http://unc.dl.sourceforge.net/sourceforge/libpng/ + +confopt="--prefix=$root/usr --shared" +export CFLAGS="$CFLAGS -fPIC" + +post_install() { + unset AR + # build static libs + make clean && + ./configure --prefix=$root/usr + make && make install + chmod 644 $prefix/lib/libz.a + # move shared to corect location + mv $prefix/lib/libz.so.* $root/lib + ln -sf ../../lib/libz.so.1 $prefix/lib/libz.so + } diff --git a/packages/devel/emacs/emacs b/packages/devel/emacs/emacs new file mode 100644 index 0000000..1ff6455 --- /dev/null +++ b/packages/devel/emacs/emacs @@ -0,0 +1,7 @@ +# hdw - linux emacs package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 21.3 +# [S] 3-11 +# [D] emacs-21.3.tar.gz http://ftp.gnu.org/pub/gnu/emacs/ diff --git a/packages/devel/emacs/xaw_arrow_scrollbar.patch b/packages/devel/emacs/xaw_arrow_scrollbar.patch new file mode 100644 index 0000000..794e3b0 --- /dev/null +++ b/packages/devel/emacs/xaw_arrow_scrollbar.patch @@ -0,0 +1,10 @@ +--- ./src/xterm.c.orig 2003-11-04 16:16:02.000000000 +0100 ++++ ./src/xterm.c 2003-11-04 18:09:20.000000000 +0100 +@@ -131,6 +131,7 @@ + #include + #include + #define ARROW_SCROLLBAR ++#define XAW_ARROW_SCROLLBARS + #include + #else /* !HAVE_XAW3D */ + #include diff --git a/packages/devel/gdb/gdb b/packages/devel/gdb/gdb new file mode 100644 index 0000000..7764281 --- /dev/null +++ b/packages/devel/gdb/gdb @@ -0,0 +1,7 @@ +# hdw - linux gdb package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 6.1.1 +# [S] 3-4 +# [D] gdb-6.1.1.tar.bz2 ftp://ftp.gnu.org/gnu/gdb/ diff --git a/packages/devel/gdbm/gdbm b/packages/devel/gdbm/gdbm new file mode 100644 index 0000000..38a79b1 --- /dev/null +++ b/packages/devel/gdbm/gdbm @@ -0,0 +1,9 @@ +# hdw - linux gdbm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.8.3 +# [S] 3-1 +# [D] gdbm-1.8.3.tar.gz ftp://ftp.gnu.org/gnu/gdbm/ + +install_conf="$install_conf install-compat" diff --git a/packages/devel/orbit/orbit b/packages/devel/orbit/orbit new file mode 100644 index 0000000..070a748 --- /dev/null +++ b/packages/devel/orbit/orbit @@ -0,0 +1,9 @@ +# hdw - linux orbit package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.5.17 +# [S] 3-7 +# [D] ORBit-0.5.17.tar.bz2 http://ftp.gnome.org/pub/GNOME/sources/ORBit/0.5/ + +srcdir="ORBit-${ver}" diff --git a/packages/devel/python/python b/packages/devel/python/python new file mode 100644 index 0000000..9079f74 --- /dev/null +++ b/packages/devel/python/python @@ -0,0 +1,9 @@ +# hdw - linux python package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.4a1 +# [S] 3-2 +# [D] Python-2.4a1.tar.bz2 ftp://ftp.python.org/pub/python/2.4/ + +srcdir="Python-$ver" diff --git a/packages/devel/tcltk/tcltk b/packages/devel/tcltk/tcltk new file mode 100644 index 0000000..eb18a6e --- /dev/null +++ b/packages/devel/tcltk/tcltk @@ -0,0 +1,34 @@ +# hdw - linux tcltk package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 8.4.6 +# [S] 3-4 +# [D] tk8.4.6-src.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/tcl/ +# [D] tcl8.4.6-src.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/tcl/ + +bin_ver="8.6" + +custmain="1" + +custmain() { + # extract + for i in tcl tk; do + tar --use-compress-program=gzip -xvf \ + $hdw_home_dir/download/devel/tcltk/${i}${ver}-src.tar.gz + done && + + # tcl + cd tcl$ver/unix && autoconf && cd dltest && autoconf && cd .. + ./configure $confopt --enable-gcc --enable-shared + make $make_conf && make $install_conf install && + ln -svf tclsh${bin_ver} $prefix/bin/tclsh && + cd ../.. + + # tk + cd tk$ver/unix && + ./configure $confopt --enable-gcc --enable-shared + make $make_conf && make $install_conf install && + ln -svf wish${bin_ver} $prefix/bin/wish + cd ../.. + } diff --git a/packages/diet/dietlibc/dietlibc b/packages/diet/dietlibc/dietlibc new file mode 100644 index 0000000..517cd0b --- /dev/null +++ b/packages/diet/dietlibc/dietlibc @@ -0,0 +1,11 @@ +# hdw - linux dietlibc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 2-2 +# [D] dietlibc.tar.bz2 cvs:anonymous:cvs.linuxtv.org:cvs/linuxtv:dietlibc + +make_conf="$make_conf prefix=$prefix CC=gcc all dyn" +install_conf="$install_conf prefix=$prefix BINDIR=$prefix/bin" +install_conf="$install_conf MAN1DIR=$prefix/man/man1 DESTDIR=$root" diff --git a/packages/diet/fgetty/fgetty b/packages/diet/fgetty/fgetty new file mode 100644 index 0000000..dac9634 --- /dev/null +++ b/packages/diet/fgetty/fgetty @@ -0,0 +1,8 @@ +# hdw - linux fgetty package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.6 +# [S] 2-6 +# [D] fgetty-0.6.tar.bz2 http://www.fefe.de/fgetty/ + diff --git a/packages/diet/minit/minit b/packages/diet/minit/minit new file mode 100644 index 0000000..3edde04 --- /dev/null +++ b/packages/diet/minit/minit @@ -0,0 +1,13 @@ +# hdw - linux minit package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.8 +# [S] 2-15 +# [D] minit-0.8.tar.bz2 http://www.fefe.de/minit/ + +post_install() { + mv -v $root/usr/sbin/minit $root/sbin/ + [ ! -f $root/sbin/init ] && \ + ln -sfv $root/sbin/minit $root/sbin/init + } diff --git a/packages/hackbard/acroread/acroread b/packages/hackbard/acroread/acroread new file mode 100644 index 0000000..824eb93 --- /dev/null +++ b/packages/hackbard/acroread/acroread @@ -0,0 +1,21 @@ +# hdw - linux acroread package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 509 +# [S] 3-7 +# [D] linux-509.tar.gz ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/ + +# non source stuff crap, installed to /opt/acroread! +prefix=$root/opt/acroread + +srcdir="./" + +build_main() { + # patch install directory + sed "s%HDW_AR_INSTALL%$prefix%" INSTALL > INSTALL~ + mv INSTALL~ INSTALL + echo "running install script ..." + chmod 700 INSTALL + ./INSTALL + } diff --git a/packages/hackbard/acroread/install.patch b/packages/hackbard/acroread/install.patch new file mode 100644 index 0000000..d6597e4 --- /dev/null +++ b/packages/hackbard/acroread/install.patch @@ -0,0 +1,43 @@ +--- ./INSTALL.orig 2003-05-22 02:04:53.000000000 +0200 ++++ ./INSTALL 2003-05-22 02:19:51.000000000 +0200 +@@ -108,7 +108,9 @@ + echo "To decline the terms and conditions of this agreement enter \"decline\"." + echo " " + $echonl "Please type \"accept\" to accept the terms and conditions license agreement; Type \"decline\" to exit. " +- read answer ++ echo "hdw accepting ..." ++ #read answer ++ answer="accept" + ucanswer=`echo "${answer}" | tr '[a-z]' '[A-Z]'` + case "$ucanswer" in + ACCEPT) +@@ -284,7 +286,8 @@ + + echo " " + $echonl "Enter installation directory for Acrobat ${Version} [${InstallDir}] " +- read answer ++ #read answer ++ answer="HDW_AR_INSTALL" + case "$answer" in + "") + ;; +@@ -299,7 +302,8 @@ + echo " " + echo "Directory \"$InstallDir\" does not exist." + $echonl "Do you want to create it now? [y] " +- read answer ++ #read answer ++ answer=y + + if [ "$answer" ] ; then + case "$answer" in +@@ -613,7 +617,8 @@ + + echo " " + $echonl "Enter the configuration number to install: " +- read ConfigNum ++ #read ConfigNum ++ ConfigNum=${AcroIntelLinuxNum} + + fi + diff --git a/packages/hackbard/apache/apache b/packages/hackbard/apache/apache new file mode 100644 index 0000000..94b7413 --- /dev/null +++ b/packages/hackbard/apache/apache @@ -0,0 +1,19 @@ +# hdw - linux aapche package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.0.50 +# [S] 3-9 +# [D] httpd-2.0.50.tar.gz http://www.apache.de/dist/httpd/ + +srcdir="httpd-$ver" + +# we only compile apache in /opt ! +prefix="$root/opt/apache2" +confopt="--prefix=$prefix --sysconfdir=$root/etc/opt/apache2" +confopt="$confopt --localstatedir=$root/var/opt/apache2" +confopt="$confopt --oldincludedir=$prefix/include" + +# apache modules +confopt="$confopt --enable-mods-shared=all" + diff --git a/packages/hackbard/apache/apache.init b/packages/hackbard/apache/apache.init new file mode 100644 index 0000000..9617869 --- /dev/null +++ b/packages/hackbard/apache/apache.init @@ -0,0 +1,5 @@ +bin=apachectl +path=$prefix/bin +params="start" +s_value="80" +depends="ifconfig" diff --git a/packages/hackbard/avra/avra b/packages/hackbard/avra/avra new file mode 100644 index 0000000..126f7bd --- /dev/null +++ b/packages/hackbard/avra/avra @@ -0,0 +1,15 @@ +# hdw - linux avra package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.1 +# [S] 3-2 +# [D] avra-1.0.1-src.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/avra/ + +srcdir="SOURCE" + +pre_install() { + mv Makefile tmp~ + sed "s%/usr/local%$prefix%g" tmp~ > Makefile + cp $confdir/avra_manpage avra.1 + } diff --git a/packages/hackbard/avra/avra_manpage b/packages/hackbard/avra/avra_manpage new file mode 100644 index 0000000..e65b81a --- /dev/null +++ b/packages/hackbard/avra/avra_manpage @@ -0,0 +1,99 @@ +.TH avra 1 "18 September 2001" "Version 0.7" +.SH NAME +avra \- Atmel AVR assembler +.SH SYNOPSIS +.B avra +[\-\-define [=]] [\-\-listmac] [\-\-max_errors ] [--coff] [--devices] [\-\-version] [\-\-help] [-h] +.SH DESCRIPTION +.B avra +is an assembler for the Atmel AVR microcontroller series, and it is +almost compatible to Atmel's own assembler. This means it can handle the +same code that Atmels assembler can, but it has some extra features. +.PP +.IP "Better macro support" +More flexible with arguments. Calling of other macros in a macro is possible, +and even recursive macros. Global labels in macros are also possible. +.IP "Directives for conditional assembly" +Added directives: .define .undef .if .ifdef .ifndef .else .elif .endif +.PP +avra is currently supporting these systems: + Linux + AmigaOS + win32 (windows 95++ and NT) +.PP +And it should be possible to compile on anything that can eat ANSI-C. +.SH OPTIONS +.IP "\-\-define [=]" +Define a symbol. Can be set to a specific value, or 1 if no value is given. +.IP "\-\-listmac" +List macro expansion in the list file. Same function as the listmac directive. +.IP "\-\-max_errors " +Specifies the maximm number of errors before exit. Default: 10 +.IP \-\-version +Print out version information. +.IP "\-h \-\-help" +Print out a short help text. +.SH EXPRESSIONS +There is one extra function that avra supports in expressions, and that is the +function defined() which returns 1 if is a defined symbol, and 0 +otherwise. +.PP +You can force expressions to be calculated before they are parsed by enclosing +them inside {}-signs. +.SH DIRECTIVES +avra supports all directives supported by Atmel's AVRASM, but there are some extra +directives added to avra. +.IP ".define []" +Same as the .EQU directive, but uses no =-sign. If you don't specify a expression +it will be set to 1. +.IP ".undef " +Not yet implemented. +.IP ".ifdef " +Parse following lines if is a defined symbol. +.IP ".ifndef " +Negated version of .ifdef +.IP ".if " +Uses an expression to determine parsing of following lines. +.IP ".else" +Else. +.IP ".elif " +Combined else and if. +.IP ".endif" +Terminates conditional assembly. +.IP ".message " +Print out a message text. +.IP ".warning " +Print out a warning text. +.IP ".error " +Print out a error text. +.SH MACROS +avra uses the same consept for arguments that Atmel's AVRASM uses, +but it will expand a macro as pure text, and this makes it more powerfull +than AVRASM. Using {}-signs around an expression to calculate the +expression is also very useful inside macros. +.PP +Macros can call macros, and also call itself (recursive). +.PP +Labels defined in a macro is local to that macro. Macros called +inside a macro will herritage the local labels of the parrent macro. +You can make a local label into a global one by adding the global +keyword before the label. +.SH COPYRIGHT +Copyright (C) 1998-2001 Jon Anders Haugum + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place \- Suite 330, +Boston, MA 02111-1307, USA. +.SH AUTHOR +Jon Anders Haugum diff --git a/packages/hackbard/bc/bc b/packages/hackbard/bc/bc new file mode 100644 index 0000000..38ba8c4 --- /dev/null +++ b/packages/hackbard/bc/bc @@ -0,0 +1,7 @@ +# hdw - linux bc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.06 +# [S] 3-1 +# [D] bc-1.06.tar.gz ftp://ftp.gnu.org/pub/gnu/bc/ diff --git a/packages/hackbard/cdrtools/cdrtools b/packages/hackbard/cdrtools/cdrtools new file mode 100644 index 0000000..247ea94 --- /dev/null +++ b/packages/hackbard/cdrtools/cdrtools @@ -0,0 +1,15 @@ +# hdw - linux cdrtools package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.01a33 +# [S] 3-1 +# [D] cdrtools-2.01a33.tar.bz2 ftp://ftp.berlios.de/pub/cdrecord/alpha/ + +make_conf="$make_conf INS_BASE=$prefix DEFINSUSR=root DEFINSGRP=root" +install_conf="$install_conf INS_BASE=$prefix DEFINSUSR=root DEFINSGRP=root" + +build_main() { + make $make_conf + make $install_conf install + } diff --git a/packages/hackbard/cdrtools/u8.patch b/packages/hackbard/cdrtools/u8.patch new file mode 100644 index 0000000..6b1d873 --- /dev/null +++ b/packages/hackbard/cdrtools/u8.patch @@ -0,0 +1,12 @@ +--- ./libscg/scsi-linux-sg.c.orig 2004-07-14 14:16:39.000000000 +0200 ++++ ./libscg/scsi-linux-sg.c 2004-07-14 14:18:21.000000000 +0200 +@@ -65,6 +65,9 @@ + + #if LINUX_VERSION_CODE >= 0x01031a /* introduced in 1.3.26 */ + #if LINUX_VERSION_CODE >= 0x020000 /* introduced somewhere. */ ++#if LINUX_VERSION_CODE >= 0x020600 /* header changes for kernel >= 2.6 */ ++#include ++#endif + /* Need to fine tune the ifdef so we get the transition point right. */ + #include + #else diff --git a/packages/hackbard/cron/cron b/packages/hackbard/cron/cron new file mode 100644 index 0000000..754fdec --- /dev/null +++ b/packages/hackbard/cron/cron @@ -0,0 +1,43 @@ +# hdw - linux cron package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.0pl1 +# [S] 3-1 +# [D] cron3.0pl1.tar.gz ftp://metalab.unc.edu/pub/Linux/system/daemons/cron/ + +post_install() { + # crontab file + cat > $root/etc/crontab << EOS +# hdw - linux /etc/crontab +# +SHELL=/bin/sh +PATH=/bin:/sbin:/usr/bin:/usr/sbin +MAILTO="" + +# hdw - linux daily stuff executed at 5 am +0 5 * * * -x /etc/cron.d/hdw.daily && /etc/cron.d/hdw.daily + +# add your rules ! +EOS + + # crontab extension's files + mkdir -p $root/etc/cron.d + cat > $root/etc/cron.d/hdw.daily << EOS +# hdw - linux /etc/cron.d/hdw.daily +# +echo "updating system status" +echo "+ ldconfig" ; ldconfig +echo "+ makewhatis" ; makewhatis +echo "+ updatedb" ; updatedb --prunepaths='/tmp /var/tmp /proc /dev /mnt' +echo "+ depmod -a" ; depmod -a +echo "+ listing core files" + for core in \`find / -type f -name core\` ; do + echo " - \$core" + done +echo "done." +EOS + # permissions + chmod 600 $root/etc/crontab + chmod 700 $root/etc/cron.d/* + } diff --git a/packages/hackbard/cron/cron.init b/packages/hackbard/cron/cron.init new file mode 100644 index 0000000..1d98a8c --- /dev/null +++ b/packages/hackbard/cron/cron.init @@ -0,0 +1,2 @@ +depends="getty" +s_value=30 diff --git a/packages/hackbard/cron/cron_3.0pl1-72.patch b/packages/hackbard/cron/cron_3.0pl1-72.patch new file mode 100644 index 0000000..3b605da --- /dev/null +++ b/packages/hackbard/cron/cron_3.0pl1-72.patch @@ -0,0 +1,4098 @@ +--- cron-3.0pl1.orig/Makefile ++++ cron-3.0pl1/Makefile +@@ -55,30 +55,35 @@ + INCLUDE = -I. + #INCLUDE = + #<> +-LIBS = ++LIBS = $(PAM_LIBS) + #<> +-#OPTIM = -O +-OPTIM = -g ++OPTIM = -O2 ++#OPTIM = -g + #<> + # (ATT untested) + #COMPAT = -DATT + #(BSD is only needed if does not define it, as on ULTRIX) + #COMPAT = -DBSD + # (POSIX) +-#COMPAT = -DPOSIX ++COMPAT = -DPOSIX + #<> + LINTFLAGS = -hbxa $(INCLUDE) $(COMPAT) $(DEBUGGING) + #<> + #CC = vcc + #<> +-DEFS = ++# Allow override from command line ++DEBUG_DEFS = -DDEBUGGING=0 ++# The -DUSE_SIGCHLD is needed for the Alpha port ++DEFS = -DDEBIAN -DUSE_SIGCHLD $(DEBUG_DEFS) $(PAM_DEFS) + #(SGI IRIX systems need this) + #DEFS = -D_BSD_SIGNALS -Dconst= + #<> + #INSTALL = installbsd + INSTALL = install + #<> +-LDFLAGS = ++# LDFLAGS = -s ++# Let install do the strip ++ + #################################### end configurable stuff + + SHELL = /bin/sh +@@ -113,13 +118,14 @@ + $(CC) $(LDFLAGS) -o crontab $(CRONTAB_OBJ) $(LIBS) + + install : all +- $(INSTALL) -c -m 111 -o root -s cron $(DESTSBIN)/ +- $(INSTALL) -c -m 4111 -o root -s crontab $(DESTBIN)/ ++ $(INSTALL) -c -m 755 -o root -s cron $(DESTSBIN)/ ++ $(INSTALL) -c -m 4755 -o root -s crontab $(DESTBIN)/ + sh putman.sh crontab.1 $(DESTMAN) + sh putman.sh cron.8 $(DESTMAN) + sh putman.sh crontab.5 $(DESTMAN) + +-clean :; rm -f *.o cron crontab a.out core tags *~ #* ++clean : ++ rm -f *.o cron crontab a.out core tags *~ #* + + kit : $(SHAR_SOURCE) + makekit -m -s99k $(SHAR_SOURCE) +--- cron-3.0pl1.orig/README ++++ cron-3.0pl1/README +@@ -24,6 +24,12 @@ + [V1.0 was May 6, 1987] + Paul Vixie + ++[Note from Debian cron maintainer: This is the original README from ++the the vixie-cron package. The location of many cron files has been ++changed in order to comply with Debian policy and common sense -- look ++in the cron(8), crontab(1) and crontab(5) man pages for more info, as ++well as the README.Debian file in this directory.] ++ + This is a version of 'cron' that is known to run on BSD 4.[23] systems. It + is functionally based on the SysV cron, which means that each user can have + their own crontab file (all crontab files are stored in a read-protected +--- cron-3.0pl1.orig/compat.c ++++ cron-3.0pl1/compat.c +@@ -53,7 +53,10 @@ + { + char *temp; + +- temp = malloc(strlen(str) + 1); ++ if ((temp = malloc(strlen(str) + 1)) == NULL) { ++ errno = ENOMEM; ++ return NULL; ++ } + (void) strcpy(temp, str); + return temp; + } +@@ -73,7 +76,7 @@ + return sys_errlist[error]; + } + +- sprintf(buf, "Unknown error: %d", error); ++ snprintf(buf, 32, "Unknown error: %d", error); + return buf; + } + #endif +@@ -218,16 +221,18 @@ + int overwrite; + { + char *tmp; ++ int tmp_size; + + if (overwrite && getenv(name)) + return -1; + +- if (!(tmp = malloc(strlen(name) + strlen(value) + 2))) { ++ tmp_size = strlen(name) + strlen(value) + 2; ++ if (!(tmp = malloc(tmp_size))) { + errno = ENOMEM; + return -1; + } + +- sprintf("%s=%s", name, value); ++ snprintf(tmp, tmp_size, "%s=%s", name, value); + return putenv(tmp); /* intentionally orphan 'tmp' storage */ + } + #endif +--- cron-3.0pl1.orig/compat.h ++++ cron-3.0pl1/compat.h +@@ -62,8 +62,8 @@ + #endif + + #ifndef POSIX +-# if (BSD >= 199103) || defined(__linux) || defined(ultrix) || defined(AIX) ||\ +- defined(HPUX) || defined(CONVEX) || defined(IRIX) ++# if (BSD >= 199103) || defined(__linux__) || defined(__GNU__) || defined(ultrix) ||\ ++ defined(AIX) ||\ defined(HPUX) || defined(CONVEX) || defined(IRIX) + # define POSIX + # endif + #endif +@@ -76,17 +76,17 @@ + + /*****************************************************************/ + +-#if !defined(BSD) && !defined(HPUX) && !defined(CONVEX) && !defined(__linux) ++#if !defined(BSD) && !defined(HPUX) && !defined(CONVEX) && !defined(__linux__) && !defined(__GNU__) + # define NEED_VFORK + #endif + +-#if (!defined(BSD) || (BSD < 198902)) && !defined(__linux) && \ +- !defined(IRIX) && !defined(NeXT) && !defined(HPUX) ++#if (!defined(BSD) || (BSD < 198902)) && !defined(__linux__) && \ ++ !defined(IRIX) && !defined(NeXT) && !defined(HPUX) && !defined(__GNU__) + # define NEED_STRCASECMP + #endif + +-#if (!defined(BSD) || (BSD < 198911)) && !defined(__linux) &&\ +- !defined(IRIX) && !defined(UNICOS) && !defined(HPUX) ++#if (!defined(BSD) || (BSD < 198911)) && !defined(__linux__) &&\ ++ !defined(IRIX) && !defined(UNICOS) && !defined(HPUX) && !defined(__GNU__) + # define NEED_STRDUP + #endif + +@@ -102,7 +102,7 @@ + # define NEED_SETSID + #endif + +-#if (defined(POSIX) && !defined(BSD)) && !defined(__linux) ++#if (defined(POSIX) && !defined(BSD)) && !defined(__linux__) && !defined(__GNU__) + # define NEED_GETDTABLESIZE + #endif + +@@ -110,11 +110,11 @@ + # define HAVE_SAVED_UIDS + #endif + +-#if !defined(ATT) && !defined(__linux) && !defined(IRIX) && !defined(UNICOS) ++#if !defined(ATT) && !defined(__linux__) && !defined(__GNU__) && !defined(IRIX) && !defined(UNICOS) + # define USE_SIGCHLD + #endif + +-#if !defined(AIX) && !defined(UNICOS) ++#if !defined(AIX) && !defined(UNICOS) && !defined(DEBIAN) + # define SYS_TIME_H 1 + #else + # define SYS_TIME_H 0 +--- cron-3.0pl1.orig/config.h ++++ cron-3.0pl1/config.h +@@ -29,6 +29,7 @@ + */ + + #ifndef DEBUGGING ++#error DEBUGGING not defined + #define DEBUGGING 1 /* 1 or 0 -- do you want debugging code built in? */ + #endif + +@@ -42,22 +43,26 @@ + */ + + #define MAILCMD _PATH_SENDMAIL /*-*/ +-#define MAILARGS "%s -FCronDaemon -odi -oem -or0s %s" /*-*/ +- /* -Fx = set full-name of sender ++#define MAILARGS "%s -i -FCronDaemon -odi -oem %s" /*-*/ ++ /* -i = don't terminate on "." by itself ++ * -Fx = set full-name of sender + * -odi = Option Deliverymode Interactive + * -oem = Option Errors Mailedtosender ++ * -t = read recipient from header of message + * -or0s = Option Readtimeout -- don't time out ++ * XXX: sendmail doesn't allow -or0s when invoked ++ * by joe user. --okir + */ + +-/* #define MAILCMD "/bin/mail" /*-*/ +-/* #define MAILARGS "%s -d %s" /*-*/ ++/* #define MAILCMD "/bin/mail" -*/ ++/* #define MAILARGS "%s -d %s" -*/ + /* -d = undocumented but common flag: deliver locally? + */ + +-/* #define MAILCMD "/usr/mmdf/bin/submit" /*-*/ +-/* #define MAILARGS "%s -mlrxto %s" /*-*/ ++/* #define MAILCMD "/usr/mmdf/bin/submit" -*/ ++/* #define MAILARGS "%s -mlrxto %s" -*/ + +-/* #define MAIL_DATE /*-*/ ++/* #define MAIL_DATE -*/ + /* should we include an ersatz Date: header in + * generated mail? if you are using sendmail + * for MAILCMD, it is better to let sendmail +@@ -68,7 +73,7 @@ + * defined but neither exists, should crontab(1) be + * usable only by root? + */ +-/*#define ALLOW_ONLY_ROOT /*-*/ ++/*#define ALLOW_ONLY_ROOT -*/ + + /* if you want to use syslog(3) instead of appending + * to CRONDIR/LOG_FILE (/var/cron/log, e.g.), define +--- cron-3.0pl1.orig/cron.8 ++++ cron-3.0pl1/cron.8 +@@ -24,21 +24,35 @@ + .SH SYNOPSIS + cron + .SH DESCRIPTION +-.I Cron +-should be started from /etc/rc or /etc/rc.local. It will return immediately, +-so you don't need to start it with '&'. ++.I cron ++is started automatically from /etc/init.d on entering multi-user ++runlevels. + .PP +-.I Cron +-searches /var/cron/tabs for crontab files which are named after accounts in +-/etc/passwd; crontabs found are loaded into memory. +-.I Cron +-also searches for /etc/crontab which is in a different format (see +-.IR crontab(5)). +-.I Cron +-then wakes up every minute, examining all stored crontabs, checking each +-command to see if it should be run in the current minute. When executing +-commands, any output is mailed to the owner of the crontab (or to the user +-named in the MAILTO environment variable in the crontab, if such exists). ++.I cron ++searches its spool area (/var/spool/cron/crontabs) for crontab ++files (which are named after accounts in ++/etc/passwd); crontabs found are loaded into memory. Note that ++crontabs in this directory should not be accessed directly - ++the ++.I crontab ++command should be used to access and update them. ++ ++.I cron ++also reads /etc/crontab, which is in a slightly different format (see ++.IR crontab(5)). ++Additionally, cron reads the files in /etc/cron.d; see ++the ++.B DEBIAN SPECIFIC ++section below for more details. ++ ++.I cron ++then wakes up every minute, examining all stored crontabs, checking ++each command to see if it should be run in the current minute. When ++executing commands, any output is mailed to the owner of the crontab ++(or to the user named in the MAILTO environment variable in the ++crontab, if such exists). The children copies of cron running these ++processes has its name coerced to uppercase, as will be seen in the ++syslog and ps output. + .PP + Additionally, + .I cron +@@ -51,9 +65,37 @@ + changed. Thus + .I cron + need not be restarted whenever a crontab file is modified. Note that the +-.IR Crontab (1) ++.IR crontab (1) + command updates the modtime of the spool directory whenever it changes a + crontab. ++.PP ++Special considerations exist when the clock is changed by less than 3 ++hours, for example at the beginning and end of daylight savings ++time. If the time has moved forwards, those jobs which would have ++run in the time that was skipped will be run soon after the change. ++Conversely, if the time has moved backwards by less than 3 hours, ++those jobs that fall into the repeated time will not be re-run. ++.PP ++Only jobs that run at a particular time (not specified as ++@hourly, nor with '*' in the hour or minute specifier) are ++affected. Jobs which are specified with wildcards are run based on the ++new time immediately. ++.PP ++Clock changes of more than 3 hours are considered to be corrections to ++the clock, and the new time is used immediately. ++.SH DEBIAN SPECIFIC ++.I cron ++treats the files in /etc/cron.d as extensions to the /etc/crontab file (they ++follow the special format of that file, i.e. they include the ++.I user ++field). The intended purpose of this feature is to allow packages that require ++finer control of their scheduling than the /etc/cron.{daily,weekly,monthly} ++directories allow to add a crontab file to /etc/cron.d. Such files ++should be named after the package that supplies them. Files must ++conform to the same naming convention as used by run-parts(8): they ++must consist solely of upper- and lower-case letters, digits, underscores, ++and hyphens. Like /etc/crontab, the files in the /etc/cron.d directory are ++monitored for changes. + .SH "SEE ALSO" + crontab(1), crontab(5) + .SH AUTHOR +--- cron-3.0pl1.orig/cron.c ++++ cron-3.0pl1/cron.c +@@ -24,7 +24,7 @@ + + + #include "cron.h" +-#include ++#include + #if SYS_TIME_H + # include + #else +@@ -34,9 +34,9 @@ + + static void usage __P((void)), + run_reboot_jobs __P((cron_db *)), +- cron_tick __P((cron_db *)), +- cron_sync __P((void)), +- cron_sleep __P((void)), ++ find_jobs __P((time_min, cron_db *, int, int)), ++ set_time __P((void)), ++ cron_sleep __P((time_min)), + #ifdef USE_SIGCHLD + sigchld_handler __P((int)), + #endif +@@ -46,7 +46,16 @@ + + static void + usage() { +- fprintf(stderr, "usage: %s [-x debugflag[,...]]\n", ProgramName); ++#if DEBUGGING ++ char **dflags; ++ ++ fprintf(stderr, "usage: %s [-x [", ProgramName); ++ for(dflags = DebugFlagNames; *dflags; dflags++) ++ fprintf(stderr, "%s%s", *dflags, dflags[1] ? "," : "]"); ++ fprintf(stderr, "]\n"); ++#else ++ fprintf(stderr, "usage: %s\n", ProgramName); ++#endif + exit(ERROR_EXIT); + } + +@@ -100,6 +109,9 @@ + /* child process */ + log_it("CRON",getpid(),"STARTUP","fork ok"); + (void) setsid(); ++ freopen("/dev/null", "r", stdin); ++ freopen("/dev/null", "w", stdout); ++ freopen("/dev/null", "w", stderr); + break; + default: + /* parent process should just die */ +@@ -110,28 +122,136 @@ + acquire_daemonlock(0); + database.head = NULL; + database.tail = NULL; +- database.mtime = (time_t) 0; ++ database.sys_mtime = (time_t) 0; ++ database.user_mtime = (time_t) 0; ++#ifdef DEBIAN ++ database.sysd_mtime = (time_t) 0; ++#endif + load_database(&database); ++ ++ set_time(); + run_reboot_jobs(&database); +- cron_sync(); ++ timeRunning = virtualTime = clockTime; ++ ++ /* ++ * too many clocks, not enough time (Al. Einstein) ++ * These clocks are in minutes since the epoch (time()/60). ++ * virtualTime: is the time it *would* be if we woke up ++ * promptly and nobody ever changed the clock. It is ++ * monotonically increasing... unless a timejump happens. ++ * At the top of the loop, all jobs for 'virtualTime' have run. ++ * timeRunning: is the time we last awakened. ++ * clockTime: is the time when set_time was last called. ++ */ + while (TRUE) { +-# if DEBUGGING +- if (!(DebugFlags & DTEST)) +-# endif /*DEBUGGING*/ +- cron_sleep(); ++ time_min timeDiff; ++ int wakeupKind; + + load_database(&database); + +- /* do this iteration ++ /* ... wait for the time (in minutes) to change ... */ ++ do { ++ cron_sleep(timeRunning + 1); ++ set_time(); ++ } while (clockTime == timeRunning); ++ timeRunning = clockTime; ++ ++ /* ++ * ... calculate how the current time differs from ++ * our virtual clock. Classify the change into one ++ * of 4 cases + */ +- cron_tick(&database); ++ timeDiff = timeRunning - virtualTime; + +- /* sleep 1 minute +- */ +- TargetTime += 60; ++ /* shortcut for the most common case */ ++ if (timeDiff == 1) { ++ virtualTime = timeRunning; ++ find_jobs(virtualTime, &database, TRUE, TRUE); ++ } else { ++ wakeupKind = -1; ++ if (timeDiff > -(3*MINUTE_COUNT)) ++ wakeupKind = 0; ++ if (timeDiff > 0) ++ wakeupKind = 1; ++ if (timeDiff > 5) ++ wakeupKind = 2; ++ if (timeDiff > (3*MINUTE_COUNT)) ++ wakeupKind = 3; ++ ++ switch (wakeupKind) { ++ case 1: ++ /* ++ * case 1: timeDiff is a small positive number ++ * (wokeup late) run jobs for each virtual minute ++ * until caught up. ++ */ ++ Debug(DSCH, ("[%d], normal case %d minutes to go\n", ++ getpid(), timeRunning - virtualTime)) ++ do { ++ if (job_runqueue()) ++ sleep(10); ++ virtualTime++; ++ find_jobs(virtualTime, &database, TRUE, TRUE); ++ } while (virtualTime< timeRunning); ++ break; ++ ++ case 2: ++ /* ++ * case 2: timeDiff is a medium-sized positive number, ++ * for example because we went to DST run wildcard ++ * jobs once, then run any fixed-time jobs that would ++ * otherwise be skipped if we use up our minute ++ * (possible, if there are a lot of jobs to run) go ++ * around the loop again so that wildcard jobs have ++ * a chance to run, and we do our housekeeping ++ */ ++ Debug(DSCH, ("[%d], DST begins %d minutes to go\n", ++ getpid(), timeRunning - virtualTime)) ++ /* run wildcard jobs for current minute */ ++ find_jobs(timeRunning, &database, TRUE, FALSE); ++ ++ /* run fixed-time jobs for each minute missed */ ++ do { ++ if (job_runqueue()) ++ sleep(10); ++ virtualTime++; ++ find_jobs(virtualTime, &database, FALSE, TRUE); ++ set_time(); ++ } while (virtualTime< timeRunning && ++ clockTime == timeRunning); ++ break; ++ ++ case 0: ++ /* ++ * case 3: timeDiff is a small or medium-sized ++ * negative num, eg. because of DST ending just run ++ * the wildcard jobs. The fixed-time jobs probably ++ * have already run, and should not be repeated ++ * virtual time does not change until we are caught up ++ */ ++ Debug(DSCH, ("[%d], DST ends %d minutes to go\n", ++ getpid(), virtualTime - timeRunning)) ++ find_jobs(timeRunning, &database, TRUE, FALSE); ++ break; ++ default: ++ /* ++ * other: time has changed a *lot*, ++ * jump virtual time, and run everything ++ */ ++ Debug(DSCH, ("[%d], clock jumped\n", getpid())) ++ virtualTime = timeRunning; ++ find_jobs(timeRunning, &database, TRUE, TRUE); ++ } ++ } ++ /* jobs to be run (if any) are loaded. clear the queue */ ++ job_runqueue(); + } + } + ++#ifdef DEBIAN ++#include ++#include ++#endif + + static void + run_reboot_jobs(db) +@@ -139,7 +259,31 @@ + { + register user *u; + register entry *e; ++ int rbfd; ++#ifdef DEBIAN ++#define REBOOT_FILE "/var/run/crond.reboot" ++ /* Run on actual reboot, rather than cron restart */ ++ if (access(REBOOT_FILE, F_OK) == 0) { ++ /* File exists, return */ ++ log_it("CRON", getpid(),"INFO", ++ "Skipping @reboot jobs -- not system startup"); ++ return; ++ } ++ /* Create the file */ ++ if ((rbfd = creat(REBOOT_FILE, S_IRUSR&S_IWUSR)) < 0) { ++ /* Bad news, bail out */ ++ log_it("CRON",getpid(),"DEATH","Can't create reboot check file"); ++ exit(0); ++ } else { ++ close(rbfd); ++ log_it("CRON", getpid(),"INFO", "Running @reboot jobs"); ++ } ++ + ++ Debug(DMISC, ("[%d], Debian running reboot jobs\n",getpid())); ++ ++#endif ++ Debug(DMISC, ("[%d], vixie running reboot jobs\n", getpid())); + for (u = db->head; u != NULL; u = u->next) { + for (e = u->crontab; e != NULL; e = e->next) { + if (e->flags & WHEN_REBOOT) { +@@ -152,10 +296,14 @@ + + + static void +-cron_tick(db) ++find_jobs(vtime, db, doWild, doNonWild) ++ time_min vtime; + cron_db *db; ++ int doWild; ++ int doNonWild; + { +- register struct tm *tm = localtime(&TargetTime); ++ time_t virtualSecond = vtime * SECONDS_PER_MINUTE; ++ register struct tm *tm = localtime(&virtualSecond); + register int minute, hour, dom, month, dow; + register user *u; + register entry *e; +@@ -168,8 +316,9 @@ + month = tm->tm_mon +1 /* 0..11 -> 1..12 */ -FIRST_MONTH; + dow = tm->tm_wday -FIRST_DOW; + +- Debug(DSCH, ("[%d] tick(%d,%d,%d,%d,%d)\n", +- getpid(), minute, hour, dom, month, dow)) ++ Debug(DSCH, ("[%d] tick(%d,%d,%d,%d,%d) %s %s\n", ++ getpid(), minute, hour, dom, month, dow, ++ doWild?" ":"No wildcard",doNonWild?" ":"Wildcard only")) + + /* the dom/dow situation is odd. '* * 1,15 * Sun' will run on the + * first and fifteenth AND every Sunday; '* * * * Sun' will run *only* +@@ -180,73 +329,57 @@ + for (u = db->head; u != NULL; u = u->next) { + for (e = u->crontab; e != NULL; e = e->next) { + Debug(DSCH|DEXT, ("user [%s:%d:%d:...] cmd=\"%s\"\n", +- env_get("LOGNAME", e->envp), +- e->uid, e->gid, e->cmd)) +- if (bit_test(e->minute, minute) +- && bit_test(e->hour, hour) +- && bit_test(e->month, month) +- && ( ((e->flags & DOM_STAR) || (e->flags & DOW_STAR)) ++ env_get("LOGNAME", e->envp), ++ e->uid, e->gid, e->cmd)) ++ if (bit_test(e->minute, minute) && ++ bit_test(e->hour, hour) && ++ bit_test(e->month, month) && ++ ( ((e->flags & DOM_STAR) || (e->flags & DOW_STAR)) + ? (bit_test(e->dow,dow) && bit_test(e->dom,dom)) +- : (bit_test(e->dow,dow) || bit_test(e->dom,dom)) +- ) +- ) { +- job_add(e, u); ++ : (bit_test(e->dow,dow) || bit_test(e->dom,dom)))) { ++ if ((doNonWild && !(e->flags & (MIN_STAR|HR_STAR))) ++ || (doWild && (e->flags & (MIN_STAR|HR_STAR)))) ++ job_add(e, u); + } + } + } + } + + +-/* the task here is to figure out how long it's going to be until :00 of the +- * following minute and initialize TargetTime to this value. TargetTime +- * will subsequently slide 60 seconds at a time, with correction applied +- * implicitly in cron_sleep(). it would be nice to let cron execute in +- * the "current minute" before going to sleep, but by restarting cron you +- * could then get it to execute a given minute's jobs more than once. +- * instead we have the chance of missing a minute's jobs completely, but +- * that's something sysadmin's know to expect what with crashing computers.. ++/* ++ * set StartTime and clockTime to the current time. ++ * these are used for computing what time it really is right now. ++ * note that clockTime is a unix wallclock time converted to minutes + */ + static void +-cron_sync() { +- register struct tm *tm; +- +- TargetTime = time((time_t*)0); +- tm = localtime(&TargetTime); +- TargetTime += (60 - tm->tm_sec); ++set_time() ++{ ++ StartTime = time((time_t *)0); ++ clockTime = StartTime / (unsigned long)SECONDS_PER_MINUTE; + } + +- ++/* ++ * try to just hit the next minute ++ */ + static void +-cron_sleep() { ++cron_sleep(target) ++ time_min target; ++{ + register int seconds_to_wait; + +- do { +- seconds_to_wait = (int) (TargetTime - time((time_t*)0)); +- Debug(DSCH, ("[%d] TargetTime=%ld, sec-to-wait=%d\n", +- getpid(), TargetTime, seconds_to_wait)) +- +- /* if we intend to sleep, this means that it's finally +- * time to empty the job queue (execute it). +- * +- * if we run any jobs, we'll probably screw up our timing, +- * so go recompute. +- * +- * note that we depend here on the left-to-right nature +- * of &&, and the short-circuiting. +- */ +- } while (seconds_to_wait > 0 && job_runqueue()); ++ seconds_to_wait = (int)(target*SECONDS_PER_MINUTE - time((time_t*)0)) + 1; ++ Debug(DSCH, ("[%d] TargetTime=%ld, sec-to-wait=%d\n", ++ getpid(), (long)target*SECONDS_PER_MINUTE, seconds_to_wait)) + +- while (seconds_to_wait > 0) { +- Debug(DSCH, ("[%d] sleeping for %d seconds\n", +- getpid(), seconds_to_wait)) +- seconds_to_wait = (int) sleep((unsigned int) seconds_to_wait); +- } ++ if (seconds_to_wait > 0 && seconds_to_wait< 65) ++ sleep((unsigned int) seconds_to_wait); + } + + + #ifdef USE_SIGCHLD + static void + sigchld_handler(x) { ++ int save_errno = errno; + WAIT_T waiter; + PID_T pid; + +@@ -260,10 +393,12 @@ + case -1: + Debug(DPROC, + ("[%d] sigchld...no children\n", getpid())) ++ errno = save_errno; + return; + case 0: + Debug(DPROC, + ("[%d] sigchld...no dead kids\n", getpid())) ++ errno = save_errno; + return; + default: + Debug(DPROC, +@@ -271,6 +406,7 @@ + getpid(), pid, WEXITSTATUS(waiter))) + } + } ++ errno = save_errno; + } + #endif /*USE_SIGCHLD*/ + +@@ -278,6 +414,10 @@ + static void + sighup_handler(x) { + log_close(); ++ ++ /* we should use sigaction for proper signal blocking as this ++ has a race, but... */ ++ signal(SIGHUP, sighup_handler); + } + + +--- cron-3.0pl1.orig/cron.h ++++ cron-3.0pl1/cron.h +@@ -66,8 +66,8 @@ + #define OK_EXIT 0 /* exit() with this is considered 'normal' */ + #define MAX_FNAME 100 /* max length of internally generated fn */ + #define MAX_COMMAND 1000 /* max length of internally generated cmd */ +-#define MAX_ENVSTR 1000 /* max length of envvar=value\0 strings */ +-#define MAX_TEMPSTR 100 /* obvious */ ++#define MAX_TEMPSTR 1000 /* max length of envvar=value\0 strings */ ++#define MAX_ENVSTR MAX_TEMPSTR /* DO NOT change - buffer overruns otherwise */ + #define MAX_UNAME 20 /* max length of username, should be overkill */ + #define ROOT_UID 0 /* don't change this, it really must be root */ + #define ROOT_USER "root" /* ditto */ +@@ -118,6 +118,10 @@ + LineNumber = ln; \ + } + ++typedef int time_min; ++ ++#define SECONDS_PER_MINUTE 60 ++ + #define FIRST_MINUTE 0 + #define LAST_MINUTE 59 + #define MINUTE_COUNT (LAST_MINUTE - FIRST_MINUTE + 1) +@@ -160,6 +164,8 @@ + #define DOM_STAR 0x01 + #define DOW_STAR 0x02 + #define WHEN_REBOOT 0x04 ++#define MIN_STAR 0x08 ++#define HR_STAR 0x10 + } entry; + + /* the crontab database will be a list of the +@@ -178,7 +184,11 @@ + + typedef struct _cron_db { + user *head, *tail; /* links */ +- time_t mtime; /* last modtime on spooldir */ ++ time_t user_mtime; /* last modtime on spooldir */ ++ time_t sys_mtime; /* last modtime on system crontab */ ++#ifdef DEBIAN ++ time_t sysd_mtime; /* last modtime on system crondir */ ++#endif + } cron_db; + + +@@ -205,6 +215,7 @@ + get_char __P((FILE *)), + get_string __P((char *, int, FILE *, char *)), + swap_uids __P((void)), ++ swap_uids_back __P((void)), + load_env __P((char *, FILE *)), + cron_pclose __P((FILE *)), + strcmp_until __P((char *, char *, int)), +@@ -225,7 +236,7 @@ + entry *load_entry __P((FILE *, void (*)(), + struct passwd *, char **)); + +-FILE *cron_popen __P((char *, char *)); ++FILE *cron_popen __P((char *, char *, entry *)); + + + /* in the C tradition, we only create +@@ -254,7 +265,10 @@ + + char *ProgramName; + int LineNumber; +-time_t TargetTime; ++time_t StartTime; ++time_min timeRunning; ++time_min virtualTime; ++time_min clockTime; + + # if DEBUGGING + int DebugFlags; +@@ -269,7 +283,10 @@ + *DowNames[], + *ProgramName; + extern int LineNumber; +-extern time_t TargetTime; ++extern time_t StartTime; ++extern time_min timeRunning; ++extern time_min virtualTime; ++extern time_min clockTime; + # if DEBUGGING + extern int DebugFlags; + extern char *DebugFlagNames[]; +--- cron-3.0pl1.orig/crontab.1 ++++ cron-3.0pl1/crontab.1 +@@ -26,26 +26,27 @@ + .br + crontab [ -u user ] { -l | -r | -e } + .SH DESCRIPTION +-.I Crontab ++.I crontab + is the program used to install, deinstall or list the tables + used to drive the + .IR cron (8) + daemon in Vixie Cron. Each user can have their own crontab, and though +-these are files in /var, they are not intended to be edited directly. ++these are files in /var/spool/cron/crontabs, ++they are not intended to be edited directly. + .PP + If the +-.I allow ++.I /etc/cron.allow + file exists, then you must be listed therein in order to be allowed to use + this command. If the +-.I allow ++.I /etc/cron.allow + file does not exist but the +-.I deny ++.I /etc/cron.deny + file does exist, then you must \fBnot\fR be listed in the +-.I deny ++.I /etc/cron.deny + file in order to use this command. If neither of these files exists, then + depending on site-dependent configuration parameters, only the super user + will be allowed to use this command, or all users will be able to use this +-command. ++command. For standard Debian systems, all users may use this command. + .PP + If the + .I -u +@@ -58,7 +59,7 @@ + can confuse + .I crontab + and that if you are running inside of +-.IR su (8) ++.IR su (8) + you should always use the + .I -u + option for safety's sake. +@@ -68,7 +69,10 @@ + .PP + The + .I -l +-option causes the current crontab to be displayed on standard output. ++option causes the current crontab to be displayed on standard output. See ++the note under ++.B DEBIAN SPECIFIC ++below. + .PP + The + .I -r +@@ -77,14 +81,39 @@ + The + .I -e + option is used to edit the current crontab using the editor specified by +-the \s-1VISUAL\s+1 or \s-1EDITOR\s+1 environment variables. After you exit ++the \s-1VISUAL\s+1 or \s-1EDITOR\s+1 environment variables. ++The specified editor ++.B must ++edit the file in place; ++any editor that unlinks the file and recreates it cannot be used. ++After you exit + from the editor, the modified crontab will be installed automatically. ++.SH DEBIAN SPECIFIC ++The "out-of-the-box" behaviour for ++.I crontab -l ++is to display the three line "DO NOT EDIT THIS FILE" header ++that is placed at the ++beginning of the crontab when it is installed. The problem is that ++it makes the sequence ++.PP ++crontab -l | crontab - ++.PP ++non-idempotent -- you keep adding copies of the header. This causes ++pain to scripts that use sed to edit a crontab. Therefore, the default ++behaviour of the ++.B -l ++option has been changed to not output such header. You may obtain the ++original behaviour by setting the environment variable ++.B CRONTAB_NOHEADER ++to 'N', which will cause the ++.I crontab -l ++command to emit the extraneous header. + .SH "SEE ALSO" + crontab(5), cron(8) + .SH FILES + .nf +-/var/cron/allow +-/var/cron/deny ++/etc/cron.allow ++/etc/cron.deny + .fi + .SH STANDARDS + The +@@ -92,9 +121,18 @@ + command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax + differs from previous versions of Vixie Cron, as well as from the classic + SVR3 syntax. ++ + .SH DIAGNOSTICS + A fairly informative usage message appears if you run it with a bad command + line. ++ ++.SH BUGS ++Although cron requires that each entry in a crontab end in a newline ++character, the neither the crontab command nor the cron daemon will ++detect this error. Instead, the crontab will appear load ++normally. However, the command will never run. The best choice is to ++ensure that your crontab has a blank line at the end. ++ + .SH AUTHOR + .nf + Paul Vixie +--- cron-3.0pl1.orig/crontab.5 ++++ cron-3.0pl1/crontab.5 +@@ -34,7 +34,7 @@ + as part of a cron command. + .PP + Blank lines and leading spaces and tabs are ignored. Lines whose first +-non-space character is a pound-sign (#) are comments, and are ignored. ++non-space character is a hash-sign (#) are comments, and are ignored. + Note that comments are not allowed on the same line as cron commands, since + they will be taken to be part of the command. Similarly, comments are not + allowed on the same line as environment variable settings. +@@ -59,8 +59,9 @@ + .IR cron (8) + daemon. + SHELL is set to /bin/sh, and LOGNAME and HOME are set from the /etc/passwd +-line of the crontab's owner. +-HOME and SHELL may be overridden by settings in the crontab; LOGNAME may not. ++line of the crontab's owner. PATH is set to "/usr/bin:/bin". ++HOME, SHELL, and PATH may be overridden by settings in the crontab; ++LOGNAME may not. + .PP + (Another note: the LOGNAME variable is sometimes called USER on BSD systems... + on these systems, USER will be set also.) +@@ -70,15 +71,19 @@ + will look at MAILTO if it has any reason to send mail as a result of running + commands in ``this'' crontab. If MAILTO is defined (and non-empty), mail is + sent to the user so named. If MAILTO is defined but empty (MAILTO=""), no +-mail will be sent. Otherwise mail is sent to the owner of the crontab. This +-option is useful if you decide on /bin/mail instead of /usr/lib/sendmail as +-your mailer when you install cron -- /bin/mail doesn't do aliasing, and UUCP +-usually doesn't read its mail. ++mail will be sent. Otherwise mail is sent to the owner of the crontab. + .PP + The format of a cron command is very much the V7 standard, with a number of + upward-compatible extensions. Each line has five time and date fields, +-followed by a user name if this is the system crontab file, +-followed by a command. Commands are executed by ++followed by a command, followed by a newline character ('\n'). ++The system crontab (/etc/crontab) uses the same format, except that ++the username for the command is specified after the time and ++date fields and before the command. ++Note that if the line does not have a trailing newline character, the ++entire line will be silently ignored by both crontab and cron; the command ++will never be executed. ++.PP ++Commands are executed by + .IR cron (8) + when the minute, hour, and month of year fields match the current time, + .I and +@@ -97,9 +102,9 @@ + .br + hour 0-23 + .br +-day of month 0-31 ++day of month 1-31 + .br +-month 0-12 (or names, see below) ++month 1-12 (or names, see below) + .br + day of week 0-7 (0 or 7 is Sun, or use names) + .br +@@ -146,6 +151,30 @@ + ``30 4 1,15 * 5'' + would cause a command to be run at 4:30 am on the 1st and 15th of each + month, plus every Friday. ++.PP ++Instead of the first five fields, one of eight special strings may appear: ++.IP ++.ta 1.5i ++string meaning ++.br ++------ ------- ++.br ++@reboot Run once, at startup. ++.br ++@yearly Run once a year, "0 0 1 1 *". ++.br ++@annually (same as @yearly) ++.br ++@monthly Run once a month, "0 0 1 * *". ++.br ++@weekly Run once a week, "0 0 * * 0". ++.br ++@daily Run once a day, "0 0 * * *". ++.br ++@midnight (same as @daily) ++.br ++@hourly Run once an hour, "0 * * * *". ++.br + .SH EXAMPLE CRON FILE + .nf + +@@ -163,6 +192,25 @@ + 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" + 5 4 * * sun echo "run at 5 after 4 every sunday" + .fi ++.SH EXAMPLE SYSTEM CRON FILE ++This has the username field, as used by /etc/crontab. ++.nf ++# /etc/crontab: system-wide crontab ++# Unlike any other crontab you don't have to run the `crontab' ++# command to install the new version when you edit this file. ++# This file also has a username field, that none of the other crontabs do. ++ ++SHELL=/bin/sh ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ++ ++# m h dom mon dow user command ++42 6 * * * root run-parts --report /etc/cron.daily ++47 6 * * 7 root run-parts --report /etc/cron.weekly ++52 6 1 * * root run-parts --report /etc/cron.monthly ++# ++# Removed invocation of anacron, as this is now handled by a ++# /etc/cron.d file ++.fi + .SH SEE ALSO + cron(8), crontab(1) + .SH EXTENSIONS +@@ -183,6 +231,9 @@ + mailed to a person other than the crontab owner (SysV can't do this), or the + feature can be turned off and no mail will be sent at all (SysV can't do this + either). ++.PP ++All of the `@' commands that can appear in place of the first five fields ++are extensions. + .SH AUTHOR + .nf + Paul Vixie +--- cron-3.0pl1.orig/crontab.c ++++ cron-3.0pl1/crontab.c +@@ -31,6 +31,7 @@ + #include "cron.h" + #include + #include ++#include + #include + #include + #ifdef USE_UTIMES +@@ -55,9 +56,9 @@ + + + static PID_T Pid; +-static char User[MAX_UNAME], RealUser[MAX_UNAME]; ++static char *User, *RealUser; + static char Filename[MAX_FNAME]; +-static FILE *NewCrontab; ++static FILE *NewCrontab = NULL; + static int CheckErrorCount; + static enum opt_t Option; + static struct passwd *pw; +@@ -124,11 +125,23 @@ + case opt_replace: if (replace_cmd() < 0) + exitstatus = ERROR_EXIT; + break; ++ /* The following was added to shut ++ -Wall up, but it will never be hit, ++ because the option parser will catch ++ it */ ++ case opt_unknown: usage("unknown option specified"); ++ break; + } + exit(0); + /*NOTREACHED*/ + } + ++#if DEBUGGING ++char *getoptarg = "u:lerx:"; ++#else ++char *getoptarg = "u:ler"; ++#endif ++ + + static void + parse_args(argc, argv) +@@ -136,6 +149,7 @@ + char *argv[]; + { + int argch; ++ struct stat statbuf; + + if (!(pw = getpwuid(getuid()))) { + fprintf(stderr, "%s: your UID isn't in the passwd file.\n", +@@ -143,30 +157,42 @@ + fprintf(stderr, "bailing out.\n"); + exit(ERROR_EXIT); + } +- strcpy(User, pw->pw_name); +- strcpy(RealUser, User); ++ if (((User=strdup(pw->pw_name)) == NULL) || ++ ((RealUser=strdup(pw->pw_name)) == NULL)) { ++ fprintf(stderr, "Memory allocation error\n"); ++ exit(ERROR_EXIT); ++ } + Filename[0] = '\0'; + Option = opt_unknown; +- while (EOF != (argch = getopt(argc, argv, "u:lerx:"))) { ++ ++ while (EOF != (argch = getopt(argc, argv, getoptarg))) { + switch (argch) { ++#if DEBUGGING + case 'x': + if (!set_debug_flags(optarg)) + usage("bad debug option"); ++ usage("unrecognized option"); + break; ++#endif + case 'u': +- if (getuid() != ROOT_UID) ++ if (!(pw = getpwnam(optarg))) ++ { ++ fprintf(stderr, "%s: user `%s' unknown\n", ++ ProgramName, optarg); ++ exit(ERROR_EXIT); ++ } ++ if ((getuid() != ROOT_UID) && ++ (getuid() != pw->pw_uid)) + { + fprintf(stderr, + "must be privileged to use -u\n"); + exit(ERROR_EXIT); + } +- if (!(pw = getpwnam(optarg))) +- { +- fprintf(stderr, "%s: user `%s' unknown\n", +- ProgramName, optarg); ++ free(User); ++ if ((User=strdup(pw->pw_name)) == NULL) { ++ fprintf(stderr, "Memory allocation error\n"); + exit(ERROR_EXIT); + } +- (void) strcpy(User, optarg); + break; + case 'l': + if (Option != opt_unknown) +@@ -197,7 +223,9 @@ + } else { + if (argv[optind] != NULL) { + Option = opt_replace; +- (void) strcpy (Filename, argv[optind]); ++ (void) strncpy (Filename, argv[optind], (sizeof Filename)-1); ++ Filename[(sizeof Filename)-1] = '\0'; ++ + } else { + usage("file name must be specified for replace"); + } +@@ -227,7 +255,16 @@ + perror(Filename); + exit(ERROR_EXIT); + } +- if (swap_uids() < OK) { ++ /* Make sure we opened a normal file. */ ++ if (fstat(fileno(NewCrontab), &statbuf) < 0) { ++ perror("fstat"); ++ exit(ERROR_EXIT); ++ } ++ if (!S_ISREG(statbuf.st_mode)) { ++ fprintf(stderr, "%s: Not a regular file.\n", Filename); ++ exit(ERROR_EXIT); ++ } ++ if (swap_uids_back() < OK) { + perror("swapping uids back"); + exit(ERROR_EXIT); + } +@@ -244,9 +281,13 @@ + char n[MAX_FNAME]; + FILE *f; + int ch; ++#ifdef DEBIAN ++ int x; ++ char *ctnh; ++#endif + + log_it(RealUser, Pid, "LIST", User); +- (void) sprintf(n, CRON_TAB(User)); ++ (void) snprintf(n, MAX_FNAME, CRON_TAB(User)); + if (!(f = fopen(n, "r"))) { + if (errno == ENOENT) + fprintf(stderr, "no crontab for %s\n", User); +@@ -258,6 +299,30 @@ + /* file is open. copy to stdout, close. + */ + Set_LineNum(1) ++#ifdef DEBIAN ++ /* DEBIAN: Don't list header lines unless CRONTAB_NOHEADER is ++ 'N'. */ ++ /* ignore the top few comments since we probably put them there. ++ */ ++ if (!(ctnh = getenv("CRONTAB_NOHEADER")) || ++ toupper(*ctnh) != 'N') ++ { ++ for (x = 0; x < NHEADER_LINES; x++) { ++ ch = get_char(f); ++ if (EOF == ch) ++ break; ++ if ('#' != ch) { ++ putchar(ch); ++ break; ++ } ++ while (EOF != (ch = get_char(f))) ++ if (ch == '\n') ++ break; ++ if (EOF == ch) ++ break; ++ } ++ } ++#endif + while (EOF != (ch = get_char(f))) + putchar(ch); + fclose(f); +@@ -269,7 +334,7 @@ + char n[MAX_FNAME]; + + log_it(RealUser, Pid, "DELETE", User); +- (void) sprintf(n, CRON_TAB(User)); ++ (void) snprintf(n, MAX_FNAME, CRON_TAB(User)); + if (unlink(n)) { + if (errno == ENOENT) + fprintf(stderr, "no crontab for %s\n", User); +@@ -295,13 +360,14 @@ + char n[MAX_FNAME], q[MAX_TEMPSTR], *editor; + FILE *f; + int ch, t, x; +- struct stat statbuf; ++ struct stat statbuf, fsbuf; + time_t mtime; + WAIT_T waiter; + PID_T pid, xpid; ++ mode_t um; + + log_it(RealUser, Pid, "BEGIN EDIT", User); +- (void) sprintf(n, CRON_TAB(User)); ++ (void) snprintf(n, MAX_FNAME, CRON_TAB(User)); + if (!(f = fopen(n, "r"))) { + if (errno != ENOENT) { + perror(n); +@@ -315,11 +381,26 @@ + } + } + +- (void) sprintf(Filename, "/tmp/crontab.%d", Pid); +- if (-1 == (t = open(Filename, O_CREAT|O_EXCL|O_RDWR, 0600))) { ++ um = umask(077); ++#if 0 ++ /* The support for TMPDIR is temporarily removed, because of ++ interactions with emacs */ ++ if (getenv("TMPDIR")) { ++ strcpy(Filename, getenv("TMPDIR")); ++ } else { ++ strcpy(Filename,"/tmp"); ++ } ++#else ++ strcpy(Filename,"/tmp"); ++#endif ++ ++ (void) sprintf(Filename+strlen(Filename), "/crontab.XXXXXXXXXX"); ++ if ((t = mkstemp(Filename)) == -1) { + perror(Filename); ++ (void) umask(um); + goto fatal; + } ++ (void) umask(um); + #ifdef HAS_FCHOWN + if (fchown(t, getuid(), getgid()) < 0) { + #else +@@ -362,6 +443,10 @@ + perror(Filename); + exit(ERROR_EXIT); + } ++ if (fstat(t, &fsbuf) < 0) { ++ perror("unable to fstat temp file"); ++ goto fatal; ++ } + again: + rewind(NewCrontab); + if (ferror(NewCrontab)) { +@@ -374,6 +459,11 @@ + perror("fstat"); + goto fatal; + } ++ if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino) { ++ fprintf(stderr, "temp file must be edited in place\n"); ++ exit(ERROR_EXIT); ++ } ++ + mtime = statbuf.st_mtime; + + if ((!(editor = getenv("VISUAL"))) +@@ -390,6 +480,10 @@ + * close and reopen the file around the edit. + */ + ++ /* Turn off signals. */ ++ (void)signal(SIGHUP, SIG_IGN); ++ (void)signal(SIGINT, SIG_IGN); ++ (void)signal(SIGQUIT, SIG_IGN); + switch (pid = fork()) { + case -1: + perror("fork"); +@@ -409,7 +503,7 @@ + ProgramName); + exit(ERROR_EXIT); + } +- sprintf(q, "%s %s", editor, Filename); ++ snprintf(q, MAX_TEMPSTR, "%s %s", editor, Filename); + execlp(_PATH_BSHELL, _PATH_BSHELL, "-c", q, NULL); + perror(editor); + exit(ERROR_EXIT); +@@ -420,23 +514,37 @@ + } + + /* parent */ +- xpid = wait(&waiter); +- if (xpid != pid) { +- fprintf(stderr, "%s: wrong PID (%d != %d) from \"%s\"\n", +- ProgramName, xpid, pid, editor); +- goto fatal; +- } +- if (WIFEXITED(waiter) && WEXITSTATUS(waiter)) { +- fprintf(stderr, "%s: \"%s\" exited with status %d\n", +- ProgramName, editor, WEXITSTATUS(waiter)); +- goto fatal; +- } +- if (WIFSIGNALED(waiter)) { +- fprintf(stderr, +- "%s: \"%s\" killed; signal %d (%score dumped)\n", +- ProgramName, editor, WTERMSIG(waiter), +- WCOREDUMP(waiter) ?"" :"no "); +- goto fatal; ++ while (1) { ++ xpid = waitpid(pid, &waiter, WUNTRACED); ++ if (xpid == -1) { ++ fprintf(stderr, "%s: waitpid() failed waiting for PID %d from \"%s\": %s\n", ++ ProgramName, pid, editor, strerror(errno)); ++ } else if (xpid != pid) { ++ fprintf(stderr, "%s: wrong PID (%d != %d) from \"%s\"\n", ++ ProgramName, xpid, pid, editor); ++ goto fatal; ++ } else if (WIFSTOPPED(waiter)) { ++ /* raise(WSTOPSIG(waiter)); Not needed and breaks in job control shell*/ ++ } else if (WIFEXITED(waiter) && WEXITSTATUS(waiter)) { ++ fprintf(stderr, "%s: \"%s\" exited with status %d\n", ++ ProgramName, editor, WEXITSTATUS(waiter)); ++ goto fatal; ++ } else if (WIFSIGNALED(waiter)) { ++ fprintf(stderr, ++ "%s: \"%s\" killed; signal %d (%score dumped)\n", ++ ProgramName, editor, WTERMSIG(waiter), ++ WCOREDUMP(waiter) ?"" :"no "); ++ goto fatal; ++ } else ++ break; ++ } ++ (void)signal(SIGHUP, SIG_DFL); ++ (void)signal(SIGINT, SIG_DFL); ++ (void)signal(SIGQUIT, SIG_DFL); ++ (void)signal(SIGTSTP, SIG_DFL); ++ if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino) { ++ fprintf(stderr, "temp file must be edited in place\n"); ++ exit(ERROR_EXIT); + } + if (fstat(t, &statbuf) < 0) { + perror("fstat"); +@@ -473,7 +581,8 @@ + ProgramName, Filename); + goto done; + default: +- fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n"); ++ fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n", ++ ProgramName); + goto fatal; + } + remove: +@@ -481,7 +590,14 @@ + done: + log_it(RealUser, Pid, "END EDIT", User); + } +- ++ ++static char tn[MAX_FNAME]; ++ ++static void sig_handler(int x) ++{ ++ unlink(tn); ++ exit(1); ++} + + /* returns 0 on success + * -1 on syntax error +@@ -489,19 +605,51 @@ + */ + static int + replace_cmd() { +- char n[MAX_FNAME], envstr[MAX_ENVSTR], tn[MAX_FNAME]; ++ char n[MAX_FNAME], envstr[MAX_ENVSTR]; + FILE *tmp; +- int ch, eof; ++ int ch, eof, fd; + entry *e; + time_t now = time(NULL); + char **envp = env_init(); ++ mode_t um; ++ int saved_uid; + +- (void) sprintf(n, "tmp.%d", Pid); +- (void) sprintf(tn, CRON_TAB(n)); +- if (!(tmp = fopen(tn, "w+"))) { ++ if (envp == NULL) { ++ fprintf(stderr, "%s: Cannot allocate memory.\n", ProgramName); ++ return (-2); ++ } ++ ++ /* Assume privilege. This way we can only receive signals on our ++ input - the ones listed below (or from root - root's problem, not ++ ours). */ ++ saved_uid = getuid(); ++ if (setuid(geteuid()) < 0) { ++ perror("setuid"); ++ return -2; ++ } ++ ++ /* Assumes Linux-style signal handlers (takes int, returns void) */ ++ /* Signal handlers, to ensure we do not leave temp files in the ++ spool dir. We don't remove these on exiting this function; ++ but that's OK, we exit immediately afterwards anyway. */ ++ signal(SIGHUP, sig_handler); ++ signal(SIGINT, sig_handler); ++ signal(SIGQUIT, sig_handler); ++ signal(SIGTSTP, SIG_IGN); ++ ++ (void) snprintf(tn, MAX_FNAME, CRON_TAB("tmp.XXXXXX")); ++ um = umask(077); ++ fd = mkstemp(tn); ++ if (!fd) { ++ perror(tn); ++ return(-2); ++ } ++ tmp = fdopen(fd, "w+"); ++ if (!tmp) { + perror(tn); + return (-2); + } ++ (void) umask(um); + + /* write a signature at the top of the file. + * +@@ -517,19 +665,18 @@ + Set_LineNum(1) + while (EOF != (ch = get_char(NewCrontab))) + putc(ch, tmp); +- ftruncate(fileno(tmp), ftell(tmp)); +- fflush(tmp); rewind(tmp); + +- if (ferror(tmp)) { ++ if (ferror(tmp) || fflush(tmp) || fsync(fd)) { + fprintf(stderr, "%s: error while writing new crontab to %s\n", + ProgramName, tn); ++ perror("Error"); + fclose(tmp); unlink(tn); + return (-2); + } + + /* check the syntax of the file being installed. + */ +- ++ rewind(tmp); + /* BUG: was reporting errors after the EOF if there were any errors + * in the file proper -- kludged it by stopping after first error. + * vix 31mar87 +@@ -554,6 +701,9 @@ + if (CheckErrorCount != 0) { + fprintf(stderr, "errors in crontab file, can't install.\n"); + fclose(tmp); unlink(tn); ++ /* Give up privilege, in case we loop. */ ++ if (setreuid(saved_uid, -1) < 0) ++ return (-2); + return (-1); + } + +@@ -585,7 +735,7 @@ + return (-2); + } + +- (void) sprintf(n, CRON_TAB(User)); ++ (void) snprintf(n, sizeof(n), CRON_TAB(User)); + if (rename(tn, n)) { + fprintf(stderr, "%s: error renaming %s to %s\n", + ProgramName, tn, n); +@@ -596,6 +746,11 @@ + log_it(RealUser, Pid, "REPLACE", User); + + poke_daemon(); ++ ++ /* Give up privilege, just in case. */ ++ /* Don't need to check for error; nothing happens beyond here but a log entry, ++ and the failure message is incorrect after the rename above. */ ++ setreuid(saved_uid, -1); + + return (0); + } +--- cron-3.0pl1.orig/database.c ++++ cron-3.0pl1/database.c +@@ -31,22 +31,43 @@ + + #define TMAX(a,b) ((a)>(b)?(a):(b)) + ++/* Try to get maximum path name -- this isn't really correct, but we're ++going to be lazy */ ++ ++#ifndef PATH_MAX ++ ++#ifdef MAXPATHLEN ++#define PATH_MAX MAXPATHLEN ++#else ++#define PATH_MAX 2048 ++#endif ++ ++#endif /* ifndef PATH_MAX */ + + static void process_crontab __P((char *, char *, char *, + struct stat *, + cron_db *, cron_db *)); +- +- ++#ifdef DEBIAN ++static int valid_name (char *filename); ++static user *get_next_system_crontab __P((user *)); ++#endif + void + load_database(old_db) + cron_db *old_db; + { +- DIR *dir; ++ DIR *dir; + struct stat statbuf; + struct stat syscron_stat; + DIR_T *dp; + cron_db new_db; + user *u, *nu; ++#ifdef DEBIAN ++ struct stat syscrond_stat; ++ struct stat syscrond_file_stat; ++ ++ char syscrond_fname[PATH_MAX+1]; ++ int syscrond_change = 0; ++#endif + + Debug(DLOAD, ("[%d] load_database()\n", getpid())) + +@@ -64,6 +85,53 @@ + if (stat(SYSCRONTAB, &syscron_stat) < OK) + syscron_stat.st_mtime = 0; + ++#ifdef DEBIAN ++ /* Check mod time of SYSCRONDIR. This won't tell us if a file ++ * in it changed, but will capture deletions, which the individual ++ * file check won't ++ */ ++ if (stat(SYSCRONDIR, &syscrond_stat) < OK) { ++ log_it("CRON", getpid(), "STAT FAILED", SYSCRONDIR); ++ (void) exit(ERROR_EXIT); ++ } ++ ++ /* If SYSCRONDIR was modified, we know that something is changed and ++ * there is no need for any further checks. If it wasn't, we should ++ * pass through the old list of files in SYSCRONDIR and check their ++ * mod time. Therefore a stopped hard drive won't be spun up, since ++ * we avoid reading of SYSCRONDIR and don't change its access time. ++ * This is especially important on laptops with APM. ++ */ ++ if (old_db->sysd_mtime != syscrond_stat.st_mtime) { ++ syscrond_change = 1; ++ } else { ++ /* Look through the individual files */ ++ user *systab; ++ ++ Debug(DLOAD, ("[%d] system dir mtime unch, check files now.\n", ++ getpid())) ++ ++ for (systab = old_db->head; ++ (systab = get_next_system_crontab (systab)) != NULL; ++ systab = systab->next) { ++ ++ sprintf(syscrond_fname, "%s/%s", SYSCRONDIR, ++ systab->name + 8); ++ ++ Debug(DLOAD, ("\t%s:", syscrond_fname)) ++ ++ if (stat(syscrond_fname, &syscrond_file_stat) < OK) ++ syscrond_file_stat.st_mtime = 0; ++ ++ if (syscrond_file_stat.st_mtime != systab->mtime) { ++ syscrond_change = 1; ++ } ++ ++ Debug(DLOAD, (" [checked]\n")) ++ } ++ } ++#endif /* DEBIAN */ ++ + /* if spooldir's mtime has not changed, we don't need to fiddle with + * the database. + * +@@ -71,7 +139,14 @@ + * so is guaranteed to be different than the stat() mtime the first + * time this function is called. + */ +- if (old_db->mtime == TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) { ++#ifdef DEBIAN ++ if ((old_db->user_mtime == statbuf.st_mtime) && ++ (old_db->sys_mtime == syscron_stat.st_mtime) && ++ (!syscrond_change)) { ++#else ++ if ((old_db->user_mtime == statbuf.st_mtime) && ++ (old_db->sys_mtime == syscron_stat.st_mtime)) { ++#endif + Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n", + getpid())) + return; +@@ -82,7 +157,11 @@ + * actually changed. Whatever is left in the old database when + * we're done is chaff -- crontabs that disappeared. + */ +- new_db.mtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); ++ new_db.user_mtime = statbuf.st_mtime; ++ new_db.sys_mtime = syscron_stat.st_mtime; ++#ifdef DEBIAN ++ new_db.sysd_mtime = syscrond_stat.st_mtime; ++#endif + new_db.head = new_db.tail = NULL; + + if (syscron_stat.st_mtime) { +@@ -91,6 +170,46 @@ + &new_db, old_db); + } + ++#ifdef DEBIAN ++ /* Read all the package crontabs. */ ++ if (!(dir = opendir(SYSCRONDIR))) { ++ log_it("CRON", getpid(), "OPENDIR FAILED", SYSCRONDIR); ++ (void) exit(ERROR_EXIT); ++ } ++ ++ while (NULL != (dp = readdir(dir))) { ++ char fname[MAXNAMLEN+1], ++ tabname[PATH_MAX+1]; ++ ++ ++ /* avoid file names beginning with ".". this is good ++ * because we would otherwise waste two guaranteed calls ++ * to stat() for . and .., and also because package names ++ * starting with a period are just too nasty to consider. ++ */ ++ if (dp->d_name[0] == '.') ++ continue; ++ ++ /* skipfile names with letters outside the set ++ * [A-Za-z0-9_-], like run-parts. ++ */ ++ if (!valid_name(dp->d_name)) ++ continue; ++ ++ /* Generate the "fname" */ ++ (void) strcpy(fname,"*system*"); ++ (void) strcat(fname, dp->d_name); ++ sprintf(tabname,"%s/%s", SYSCRONDIR, dp->d_name); ++ ++ /* statbuf is used as working storage by process_crontab() -- ++ current contents are irrelevant */ ++ process_crontab("root", fname, tabname, ++ &statbuf, &new_db, old_db); ++ ++ } ++ closedir(dir); ++#endif ++ + /* we used to keep this dir open all the time, for the sake of + * efficiency. however, we need to close it in every fork, and + * we fork a lot more often than the mtime of the dir changes. +@@ -102,7 +221,7 @@ + + while (NULL != (dp = readdir(dir))) { + char fname[MAXNAMLEN+1], +- tabname[MAXNAMLEN+1]; ++ tabname[PATH_MAX+1]; + + /* avoid file names beginning with ".". this is good + * because we would otherwise waste two guaranteed calls +@@ -113,7 +232,7 @@ + continue; + + (void) strcpy(fname, dp->d_name); +- sprintf(tabname, CRON_TAB(fname)); ++ snprintf(tabname, PATH_MAX+1, CRON_TAB(fname)); + + process_crontab(fname, fname, tabname, + &statbuf, &new_db, old_db); +@@ -203,10 +322,19 @@ + int crontab_fd = OK - 1; + user *u; + ++#ifdef DEBIAN ++ /* If the name begins with *system*, don't worry about password - ++ it's part of the system crontab */ ++ if (strncmp(fname, "*system*", 8) && !(pw = getpwnam(uname))) { ++#else + if (strcmp(fname, "*system*") && !(pw = getpwnam(uname))) { ++#endif + /* file doesn't have a user in passwd file. + */ +- log_it(fname, getpid(), "ORPHAN", "no passwd entry"); ++ if (strncmp(fname, "tmp.", 4)) { ++ /* don't log these temporary files */ ++ log_it(fname, getpid(), "ORPHAN", "no passwd entry"); ++ } + goto next_crontab; + } + +@@ -259,3 +387,35 @@ + close(crontab_fd); + } + } ++ ++#ifdef DEBIAN ++ ++/* True or false? Is this a valid filename (upper/lower alpha, digits, ++ * underscores, and hyphens only?) ++ */ ++#include ++/* Same function, better compliance with ISO C */ ++static int valid_name (char *filename) ++{ ++ while (*filename) { ++ if (!(isalnum(*filename) || ++ (*filename == '_') || ++ (*filename == '-'))) ++ return 0; ++ ++filename; ++ } ++ ++ return 1; ++} ++ ++static user * ++get_next_system_crontab (curtab) ++ user *curtab; ++{ ++ for ( ; curtab != NULL; curtab = curtab->next) ++ if (!strncmp(curtab->name, "*system*", 8) && curtab->name [8]) ++ break; ++ return curtab; ++} ++ ++#endif +--- cron-3.0pl1.orig/do_command.c ++++ cron-3.0pl1/do_command.c +@@ -21,13 +21,26 @@ + + + #include "cron.h" +-#include ++#include ++#include + #if defined(sequent) + # include + #endif + #if defined(SYSLOG) + # include + #endif ++#if defined(USE_PAM) ++#include ++static pam_handle_t *pamh = NULL; ++static const struct pam_conv conv = { ++ NULL ++}; ++#define PAM_FAIL_CHECK if (retcode != PAM_SUCCESS) { \ ++ fprintf(stderr,"\n%s\n",pam_strerror(pamh, retcode)); \ ++ syslog(LOG_ERR,"%s",pam_strerror(pamh, retcode)); \ ++ pam_end(pamh, retcode); exit(1); \ ++ } ++#endif + + + static void child_process __P((entry *, user *)), +@@ -78,6 +91,10 @@ + char *usernm, *mailto; + int children = 0; + ++#if defined(USE_PAM) ++ int retcode = 0; ++#endif ++ + Debug(DPROC, ("[%d] child_process('%s')\n", getpid(), e->cmd)) + + /* mark ourselves as different to PS command watchers by upshifting +@@ -95,13 +112,32 @@ + usernm = env_get("LOGNAME", e->envp); + mailto = env_get("MAILTO", e->envp); + ++ /* Check for arguments */ ++ if (mailto) { ++ const char *end; ++ ++ /* These chars have to match those cron_popen() ++ * uses to split the command string */ ++ mailto += strspn(mailto, " \t\n"); ++ end = mailto + strcspn(mailto, " \t\n"); ++ if (*mailto == '-' || *end != '\0') { ++ printf("Bad Mailto karma.\n"); ++ log_it("CRON",getpid(),"error","bad mailto"); ++ mailto = NULL; ++ } ++ } ++ + #ifdef USE_SIGCHLD + /* our parent is watching for our death by catching SIGCHLD. we + * do not care to watch for our children's deaths this way -- we + * use wait() explictly. so we have to disable the signal (which + * was inherited from the parent). + */ ++#ifdef DEBIAN ++ (void) signal(SIGCHLD, SIG_DFL); ++#else + (void) signal(SIGCHLD, SIG_IGN); ++#endif + #else + /* on system-V systems, we are ignoring SIGCLD. we have to stop + * ignoring it now or the wait() in cron_pclose() won't work. +@@ -122,13 +158,21 @@ + * command, and subsequent characters are the additional input to + * the command. Subsequent %'s will be transformed into newlines, + * but that happens later. ++ * ++ * If there are escaped %'s, remove the escape character. + */ + /*local*/{ + register int escaped = FALSE; + register int ch; ++ register char *p; + +- for (input_data = e->cmd; ch = *input_data; input_data++) { ++ for (input_data = p = e->cmd; (ch = *input_data); ++ input_data++, p++) { ++ if (p != input_data) ++ *p = ch; + if (escaped) { ++ if (ch == '%' || ch == '\\') ++ *--p = ch; + escaped = FALSE; + continue; + } +@@ -141,8 +185,21 @@ + break; + } + } ++ *p = '\0'; + } + ++#if defined(USE_PAM) ++ retcode = pam_start("cron", usernm, &conv, &pamh); ++ PAM_FAIL_CHECK; ++ retcode = pam_acct_mgmt(pamh, PAM_SILENT); ++ PAM_FAIL_CHECK; ++ retcode = pam_open_session(pamh, PAM_SILENT); ++ PAM_FAIL_CHECK; ++ retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT); ++ PAM_FAIL_CHECK; ++ ++#endif ++ + /* fork again, this time so we can exec the user's command. + */ + switch (vfork()) { +@@ -168,9 +225,7 @@ + + /* that's the last thing we'll log. close the log files. + */ +-#ifdef SYSLOG +- closelog(); +-#endif ++ log_close(); + + /* get new pgrp, void tty, etc. + */ +@@ -188,9 +243,12 @@ + /* grandchild process. make std{in,out} be the ends of + * pipes opened by our daddy; make stderr go to stdout. + */ +- close(STDIN); dup2(stdin_pipe[READ_PIPE], STDIN); +- close(STDOUT); dup2(stdout_pipe[WRITE_PIPE], STDOUT); +- close(STDERR); dup2(STDOUT, STDERR); ++ /* Closes are unnecessary -- let dup2() do it */ ++ ++ /* close(STDIN) */; dup2(stdin_pipe[READ_PIPE], STDIN); ++ /* close(STDOUT) */; dup2(stdout_pipe[WRITE_PIPE], STDOUT); ++ /* close(STDERR)*/; dup2(STDOUT, STDERR); ++ + + /* close the pipes we just dup'ed. The resources will remain. + */ +@@ -207,10 +265,16 @@ + * we set uid, we've lost root privledges. + */ + setgid(e->gid); +-# if defined(BSD) ++# if defined(BSD) || defined(POSIX) + initgroups(env_get("LOGNAME", e->envp), e->gid); + # endif +- setuid(e->uid); /* we aren't root after this... */ ++ if (setuid(e->uid) !=0) { /* we aren't root after this... */ ++ char msg[256]; ++ snprintf(msg, 256, "do_command:setuid(%lu) failed: %s", ++ (unsigned long) e->uid, strerror(errno)); ++ log_it("CRON",getpid(),"error",msg); ++ exit(ERROR_EXIT); ++ } + chdir(env_get("HOME", e->envp)); + + /* exec the command. +@@ -227,6 +291,13 @@ + _exit(OK_EXIT); + } + # endif /*DEBUGGING*/ ++#if 0 ++ { ++ struct sigaction oact; ++ sigaction(SIGCHLD, NULL, &oact); ++ } ++ fprintf(stdout,"error"); ++#endif + execle(shell, shell, "-c", e->cmd, (char *)0, e->envp); + fprintf(stderr, "execl: couldn't exec `%s'\n", shell); + perror("execl"); +@@ -281,7 +352,7 @@ + * % -> \n + * \x -> \x for all x != % + */ +- while (ch = *input_data++) { ++ while ((ch = *input_data++) != '\0') { + if (escaped) { + if (ch != '%') + putc('\\', out); +@@ -366,9 +437,9 @@ + auto char hostname[MAXHOSTNAMELEN]; + + (void) gethostname(hostname, MAXHOSTNAMELEN); +- (void) sprintf(mailcmd, MAILARGS, +- MAILCMD, mailto); +- if (!(mail = cron_popen(mailcmd, "w"))) { ++ (void) snprintf(mailcmd, sizeof(mailcmd), ++ MAILARGS, MAILCMD, mailto); ++ if (!(mail = cron_popen(mailcmd, "w", e))) { + perror(MAILCMD); + (void) _exit(ERROR_EXIT); + } +@@ -379,7 +450,7 @@ + e->cmd); + # if defined(MAIL_DATE) + fprintf(mail, "Date: %s\n", +- arpadate(&TargetTime)); ++ arpadate(&StartTime)); + # endif /* MAIL_DATE */ + for (env = e->envp; *env; env++) + fprintf(mail, "X-Cron-Env: <%s>\n", +@@ -425,7 +496,7 @@ + if (mailto && status) { + char buf[MAX_TEMPSTR]; + +- sprintf(buf, ++ snprintf(buf, MAX_TEMPSTR, + "mailed %d byte%s of output but got status 0x%04x\n", + bytes, (bytes==1)?"":"s", + status); +@@ -460,6 +531,11 @@ + Debug(DPROC, (", dumped core")) + Debug(DPROC, ("\n")) + } ++#if defined(USE_PAM) ++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT); ++ retcode = pam_close_session(pamh, PAM_SILENT); ++ pam_end(pamh, retcode); ++#endif + } + + +--- cron-3.0pl1.orig/entry.c ++++ cron-3.0pl1/entry.c +@@ -91,6 +91,7 @@ + int ch; + char cmd[MAX_COMMAND]; + char envstr[MAX_ENVSTR]; ++ char **tenvp; + + Debug(DPARS, ("load_entry()...about to eat comments\n")) + +@@ -139,8 +140,9 @@ + bit_set(e->minute, 0); + bit_set(e->hour, 0); + bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); ++ e->flags |= DOM_STAR; + bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1)); +- bit_set(e->dow, 0); ++ bit_nset(e->dow, 0,0); + } else if (!strcmp("daily", cmd) || !strcmp("midnight", cmd)) { + bit_set(e->minute, 0); + bit_set(e->hour, 0); +@@ -149,10 +151,11 @@ + bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); + } else if (!strcmp("hourly", cmd)) { + bit_set(e->minute, 0); +- bit_set(e->hour, (LAST_HOUR-FIRST_HOUR+1)); ++ bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1)); + bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); + bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1)); + bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); ++ e->flags |= HR_STAR; + } else { + ecode = e_timespec; + goto eof; +@@ -160,6 +163,8 @@ + } else { + Debug(DPARS, ("load_entry()...about to parse numerics\n")) + ++ if (ch == '*') ++ e->flags |= MIN_STAR; + ch = get_list(e->minute, FIRST_MINUTE, LAST_MINUTE, + PPC_NULL, ch, file); + if (ch == EOF) { +@@ -170,6 +175,8 @@ + /* hours + */ + ++ if (ch == '*') ++ e->flags |= HR_STAR; + ch = get_list(e->hour, FIRST_HOUR, LAST_HOUR, + PPC_NULL, ch, file); + if (ch == EOF) { +@@ -218,6 +225,9 @@ + bit_set(e->dow, 7); + } + ++ /* If we used one of the @commands, we may be pointing at ++ blanks, and if we don't skip over them, we'll miss the user/command */ ++ Skip_Blanks(ch, file); + /* ch is the first character of a command, or a username */ + unget_char(ch, file); + +@@ -239,6 +249,9 @@ + goto eof; + } + Debug(DPARS, ("load_entry()...uid %d, gid %d\n",e->uid,e->gid)) ++ } else if (ch == '*') { ++ ecode = e_cmd; ++ goto eof; + } + + e->uid = pw->pw_uid; +@@ -247,24 +260,52 @@ + /* copy and fix up environment. some variables are just defaults and + * others are overrides. + */ +- e->envp = env_copy(envp); ++ if ((e->envp = env_copy(envp)) == NULL) { ++ ecode = e_none; ++ goto eof; ++ } + if (!env_get("SHELL", e->envp)) { +- sprintf(envstr, "SHELL=%s", _PATH_BSHELL); +- e->envp = env_set(e->envp, envstr); ++ snprintf(envstr, MAX_ENVSTR, "SHELL=%s", _PATH_BSHELL); ++ if ((tenvp = env_set(e->envp, envstr))) { ++ e->envp = tenvp; ++ } else { ++ ecode = e_none; ++ goto eof; ++ } + } + if (!env_get("HOME", e->envp)) { +- sprintf(envstr, "HOME=%s", pw->pw_dir); +- e->envp = env_set(e->envp, envstr); ++ snprintf(envstr, MAX_ENVSTR, "HOME=%s", pw->pw_dir); ++ if ((tenvp = env_set(e->envp, envstr))) { ++ e->envp = tenvp; ++ } else { ++ ecode = e_none; ++ goto eof; ++ } + } + if (!env_get("PATH", e->envp)) { +- sprintf(envstr, "PATH=%s", _PATH_DEFPATH); +- e->envp = env_set(e->envp, envstr); ++ snprintf(envstr, MAX_ENVSTR, "PATH=%s", _PATH_DEFPATH); ++ if ((tenvp = env_set(e->envp, envstr))) { ++ e->envp = tenvp; ++ } else { ++ ecode = e_none; ++ goto eof; ++ } ++ } ++ snprintf(envstr, MAX_ENVSTR, "%s=%s", "LOGNAME", pw->pw_name); ++ if ((tenvp = env_set(e->envp, envstr))) { ++ e->envp = tenvp; ++ } else { ++ ecode = e_none; ++ goto eof; + } +- sprintf(envstr, "%s=%s", "LOGNAME", pw->pw_name); +- e->envp = env_set(e->envp, envstr); + #if defined(BSD) +- sprintf(envstr, "%s=%s", "USER", pw->pw_name); +- e->envp = env_set(e->envp, envstr); ++ snprintf(envstr, MAX_ENVSTR, "%s=%s", "USER", pw->pw_name); ++ if ((tenvp = env_set(e->envp, envstr))) { ++ e->envp = tenvp; ++ } else { ++ ecode = e_none; ++ goto eof; ++ } + #endif + + Debug(DPARS, ("load_entry()...about to parse command\n")) +@@ -280,12 +321,16 @@ + */ + if (ch == EOF) { + ecode = e_cmd; ++ log_it("CRON",getpid(),"DEBUG","detected early eof"); + goto eof; + } + + /* got the command in the 'cmd' string; save it in *e. + */ +- e->cmd = strdup(cmd); ++ if ((e->cmd = strdup(cmd)) == NULL) { ++ ecode = e_none; ++ goto eof; ++ } + + Debug(DPARS, ("load_entry()...returning successfully\n")) + +@@ -294,6 +339,10 @@ + return e; + + eof: ++ if (e->envp) ++ env_free(e->envp); ++ if (e->cmd) ++ free(e->cmd); + free(e); + if (ecode != e_none && error_func) + (*error_func)(ecodes[(int)ecode]); +--- cron-3.0pl1.orig/env.c ++++ cron-3.0pl1/env.c +@@ -28,7 +28,8 @@ + { + register char **p = (char **) malloc(sizeof(char **)); + +- p[0] = NULL; ++ if (p) ++ p[0] = NULL; + return (p); + } + +@@ -55,8 +56,18 @@ + for (count = 0; envp[count] != NULL; count++) + ; + p = (char **) malloc((count+1) * sizeof(char *)); /* 1 for the NULL */ ++ if (p == NULL) { ++ errno = ENOMEM; ++ return NULL; ++ } + for (i = 0; i < count; i++) +- p[i] = strdup(envp[i]); ++ if ((p[i] = strdup(envp[i])) == NULL) { ++ while (--i >= 0) ++ (void) free(p[i]); ++ free(p); ++ errno = ENOMEM; ++ return NULL; ++ } + p[count] = NULL; + return (p); + } +@@ -87,7 +98,11 @@ + * save our new one there, and return the existing array. + */ + free(envp[found]); +- envp[found] = strdup(envstr); ++ if ((envp[found] = strdup(envstr)) == NULL) { ++ envp[found] = ""; ++ errno = ENOMEM; ++ return NULL; ++ } + return (envp); + } + +@@ -98,8 +113,15 @@ + */ + p = (char **) realloc((void *) envp, + (unsigned) ((count+1) * sizeof(char **))); ++ if (p == NULL) { ++ errno = ENOMEM; ++ return NULL; ++ } + p[count] = p[count-1]; +- p[count-1] = strdup(envstr); ++ if ((p[count-1] = strdup(envstr)) == NULL) { ++ errno = ENOMEM; ++ return NULL; ++ } + return (p); + } + +@@ -115,15 +137,17 @@ + { + long filepos; + int fileline; +- char name[MAX_TEMPSTR], val[MAX_ENVSTR]; ++ char name[MAX_ENVSTR], val[MAX_ENVSTR]; + int fields; + + filepos = ftell(f); + fileline = LineNumber; + skip_comments(f); +- if (EOF == get_string(envstr, MAX_ENVSTR, f, "\n")) ++ if (EOF == get_string(envstr, MAX_ENVSTR - 1, f, "\n")) + return (ERR); + ++ envstr[MAX_ENVSTR - 1] = '\0'; ++ + Debug(DPARS, ("load_env, read <%s>\n", envstr)) + + name[0] = val[0] = '\0'; +@@ -154,6 +178,8 @@ + } + } + ++ if (strlen(name) + 1 + strlen(val) >= MAX_ENVSTR-1) ++ return (FALSE); + (void) sprintf(envstr, "%s=%s", name, val); + Debug(DPARS, ("load_env, <%s> <%s> -> <%s>\n", name, val, envstr)) + return (TRUE); +@@ -168,7 +194,7 @@ + register int len = strlen(name); + register char *p, *q; + +- while (p = *envp++) { ++ while ((p = *envp++)) { + if (!(q = strchr(p, '='))) + continue; + if ((q - p) == len && !strncmp(p, name, len)) +--- cron-3.0pl1.orig/externs.h ++++ cron-3.0pl1/externs.h +@@ -20,6 +20,7 @@ + # include + # include + # include ++# include + # define DIR_T struct dirent + # define WAIT_T int + # define WAIT_IS_INT 1 +--- cron-3.0pl1.orig/job.c ++++ cron-3.0pl1/job.c +@@ -45,7 +45,8 @@ + if (j->e == e && j->u == u) { return; } + + /* build a job queue element */ +- j = (job*)malloc(sizeof(job)); ++ if ((j = (job*)malloc(sizeof(job))) == NULL) ++ return; + j->next = (job*) NULL; + j->e = e; + j->u = u; +--- cron-3.0pl1.orig/misc.c ++++ cron-3.0pl1/misc.c +@@ -263,11 +263,11 @@ + char buf[MAX_TEMPSTR]; + int fd, otherpid; + +- (void) sprintf(pidfile, PIDFILE, PIDDIR); ++ (void) snprintf(pidfile, MAX_FNAME, PIDFILE, PIDDIR); + if ((-1 == (fd = open(pidfile, O_RDWR|O_CREAT, 0644))) + || (NULL == (fp = fdopen(fd, "r+"))) + ) { +- sprintf(buf, "can't open or create %s: %s", ++ snprintf(buf, MAX_TEMPSTR, "can't open or create %s: %s", + pidfile, strerror(errno)); + fprintf(stderr, "%s: %s\n", ProgramName, buf); + log_it("CRON", getpid(), "DEATH", buf); +@@ -278,13 +278,14 @@ + int save_errno = errno; + + fscanf(fp, "%d", &otherpid); +- sprintf(buf, "can't lock %s, otherpid may be %d: %s", ++ snprintf(buf, MAX_TEMPSTR, "can't lock %s, otherpid may be %d: %s", + pidfile, otherpid, strerror(save_errno)); + fprintf(stderr, "%s: %s\n", ProgramName, buf); + log_it("CRON", getpid(), "DEATH", buf); + exit(ERROR_EXIT); + } +- ++ snprintf(buf, MAX_TEMPSTR, "pidfile fd = %d", fd); ++ log_it("CRON", getpid(), "INFO", buf); + (void) fcntl(fd, F_SETFD, 1); + } + +@@ -296,6 +297,7 @@ + /* abandon fd and fp even though the file is open. we need to + * keep it open and locked, but we don't need the handles elsewhere. + */ ++ + } + + /* get_char(file) : like getc() but increment LineNumber on newlines +@@ -308,7 +310,7 @@ + + ch = getc(file); + if (ch == '\n') +- Set_LineNum(LineNumber + 1) ++ Set_LineNum(LineNumber + 1); + return ch; + } + +@@ -322,7 +324,7 @@ + { + ungetc(ch, file); + if (ch == '\n') +- Set_LineNum(LineNumber - 1) ++ Set_LineNum(LineNumber - 1); + } + + +@@ -461,25 +463,26 @@ + char *event; + char *detail; + { +- PID_T pid = xpid; + #if defined(LOG_FILE) ++ PID_T pid = xpid; + char *msg; + TIME_T now = time((TIME_T) 0); + register struct tm *t = localtime(&now); ++ int msg_size; + #endif /*LOG_FILE*/ + +-#if defined(SYSLOG) +- static int syslog_open = 0; +-#endif + + #if defined(LOG_FILE) + /* we assume that MAX_TEMPSTR will hold the date, time, &punctuation. + */ +- msg = malloc(strlen(username) +- + strlen(event) +- + strlen(detail) +- + MAX_TEMPSTR); +- ++ msg_size = strlen(username) + strlen(event) + strlen(detail) + MAX_TEMPSTR; ++ msg = malloc(msg_size); ++ if (msg == NULL) { ++ /* damn, out of mem and we did not test that before... */ ++ fprintf(stderr, "%s: Run OUT OF MEMORY while %s\n", ++ ProgramName, __FUNCTION__); ++ return; ++ } + if (LogFD < OK) { + LogFD = open(LOG_FILE, O_WRONLY|O_APPEND|O_CREAT, 0600); + if (LogFD < OK) { +@@ -491,16 +494,16 @@ + } + } + +- /* we have to sprintf() it because fprintf() doesn't always write ++ /* we have to snprintf() it because fprintf() doesn't always write + * everything out in one chunk and this has to be atomically appended + * to the log file. + */ +- sprintf(msg, "%s (%02d/%02d-%02d:%02d:%02d-%d) %s (%s)\n", ++ snprintf(msg, msg_size, "%s (%02d/%02d-%02d:%02d:%02d-%d) %s (%s)\n", + username, + t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, pid, + event, detail); + +- /* we have to run strlen() because sprintf() returns (char*) on old BSD ++ /* we have to run strlen() because snprintf() returns (char*) on old BSD + */ + if (LogFD < OK || write(LogFD, msg, strlen(msg)) < OK) { + if (LogFD >= OK) +@@ -513,27 +516,30 @@ + #endif /*LOG_FILE*/ + + #if defined(SYSLOG) +- if (!syslog_open) { +- /* we don't use LOG_PID since the pid passed to us by +- * our client may not be our own. therefore we want to +- * print the pid ourselves. +- */ +-# ifdef LOG_DAEMON +- openlog(ProgramName, LOG_PID, LOG_CRON); ++ ++ ++ /* we don't use LOG_PID since the pid passed to us by ++ * our client may not be our own. therefore we want to ++ * print the pid ourselves. ++ */ ++ /* SteveG says: That comment is not consistent with the ++ code, and makes no sense -- I suspect it's a remnant ++ of a cut-n-paster... */ ++# ifdef LOG_CRON ++ openlog(ProgramName, LOG_PID, LOG_CRON); + # else +- openlog(ProgramName, LOG_PID); ++ openlog(ProgramName, LOG_PID); + # endif +- syslog_open = TRUE; /* assume openlog success */ +- } +- +- syslog(LOG_INFO, "(%s) %s (%s)\n", username, event, detail); ++ ++ syslog(LOG_INFO, "(%s) %s (%s)", username, event, detail); + ++ closelog(); + #endif /*SYSLOG*/ + + #if DEBUGGING + if (DebugFlags) { + fprintf(stderr, "log_it: (%s %d) %s (%s)\n", +- username, pid, event, detail); ++ username, xpid, event, detail); + } + #endif + } +@@ -541,10 +547,15 @@ + + void + log_close() { ++#if defined(LOG_FILE) + if (LogFD != ERR) { + close(LogFD); + LogFD = ERR; + } ++#endif ++#if defined(SYSLOG) ++ closelog(); ++#endif + } + + +@@ -604,8 +615,10 @@ + *dst++ = '^'; + *dst++ = '?'; + } else { /* parity character */ +- sprintf(dst, "\\%03o", ch); +- dst += 4; ++ /* well, the following snprintf is paranoid, but that will ++ * keep grep happy */ ++ snprintf(dst, 5, "\\%03o", ch); ++ dst += 4; + } + } + *dst = '\0'; +@@ -622,39 +635,50 @@ + { + register char *dst = malloc(len*4 + 1); + +- mkprint(dst, src, len); ++ if (dst) ++ mkprint(dst, src, len); + + return dst; + } + + + #ifdef MAIL_DATE +-/* Sat, 27 Feb 93 11:44:51 CST +- * 123456789012345678901234567 ++/* Sat, 27 Feb 1993 11:44:51 -0800 (CST) ++ * 1234567890123456789012345678901234567 + */ + char * + arpadate(clock) + time_t *clock; + { +- time_t t = clock ?*clock :time(0L); ++ static char ret[64]; /* zone name might be >3 chars */ ++ time_t t = clock ? *clock : time(NULL); + struct tm *tm = localtime(&t); +- static char ret[30]; /* zone name might be >3 chars */ +- +- (void) sprintf(ret, "%s, %2d %s %2d %02d:%02d:%02d %s", +- DowNames[tm->tm_wday], +- tm->tm_mday, +- MonthNames[tm->tm_mon], +- tm->tm_year, +- tm->tm_hour, +- tm->tm_min, +- tm->tm_sec, +- TZONE(*tm)); ++ char *qmark; ++ size_t len; ++ int hours = tm->tm_gmtoff / 3600; ++ int minutes = (tm->tm_gmtoff - (hours * 3600)) / 60; ++ ++ if (minutes < 0) ++ minutes = -minutes; ++ ++ /* Defensive coding (almost) never hurts... */ ++ len = strftime(ret, sizeof(ret), "%a, %e %b %Y %T ????? (%Z)", tm); ++ if (len == 0) { ++ ret[0] = '?'; ++ ret[1] = '\0'; ++ return ret; ++ } ++ qmark = strchr(ret, '?'); ++ if (qmark && len - (qmark - ret) >= 6) { ++ snprintf(qmark, 6, "% .2d%.2d", hours, minutes); ++ qmark[5] = ' '; ++ } + return ret; + } + #endif /*MAIL_DATE*/ + + +-#ifdef HAVE_SAVED_SUIDS ++#ifdef HAVE_SAVED_UIDS + static int save_euid; + int swap_uids() { save_euid = geteuid(); return seteuid(getuid()); } + int swap_uids_back() { return seteuid(save_euid); } +--- cron-3.0pl1.orig/pathnames.h ++++ cron-3.0pl1/pathnames.h +@@ -19,7 +19,7 @@ + * $Id: cron_3.0pl1-72.patch,v 1.1 2004-07-21 08:58:06 hackbard Exp $ + */ + +-#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX) ++#if (defined(BSD)) && (BSD >= 199103) || defined(__linux__) || defined(AIX) + # include + #endif /*BSD*/ + +@@ -28,7 +28,7 @@ + * to; SPOOL_DIR, ALLOW_FILE, DENY_FILE, and LOG_FILE + * are all relative to this directory. + */ +-#define CRONDIR "/var/cron" ++#define CRONDIR "/var/spool/cron" + #endif + + /* SPOOLDIR is where the crontabs live. +@@ -39,7 +39,7 @@ + * newer than they were last time around (or which + * didn't exist last time around...) + */ +-#define SPOOL_DIR "tabs" ++#define SPOOL_DIR "crontabs" + + /* undefining these turns off their features. note + * that ALLOW_FILE and DENY_FILE must both be defined +@@ -47,9 +47,14 @@ + * LOG_FILE or SYSLOG is defined, we don't log. If + * both are defined, we log both ways. + */ ++#ifdef DEBIAN ++#define ALLOW_FILE "/etc/cron.allow" /*-*/ ++#define DENY_FILE "/etc/cron.deny" /*-*/ ++#else + #define ALLOW_FILE "allow" /*-*/ + #define DENY_FILE "deny" /*-*/ +-#define LOG_FILE "log" /*-*/ ++#endif ++/* #define LOG_FILE "log" -*/ + + /* where should the daemon stick its PID? + */ +@@ -58,15 +63,20 @@ + #else + # define PIDDIR "/etc/" + #endif +-#define PIDFILE "%scron.pid" ++#define PIDFILE "%scrond.pid" + + /* 4.3BSD-style crontab */ + #define SYSCRONTAB "/etc/crontab" +- ++#ifdef DEBIAN ++ /* where package specific crontabs live */ ++#define SYSCRONDIR "/etc/cron.d" ++#endif + /* what editor to use if no EDITOR or VISUAL + * environment variable specified. + */ +-#if defined(_PATH_VI) ++#if defined(DEBIAN) ++# define EDITOR "/usr/bin/editor" ++#elif defined(_PATH_VI) + # define EDITOR _PATH_VI + #else + # define EDITOR "/usr/ucb/vi" +@@ -78,4 +88,8 @@ + + #ifndef _PATH_DEFPATH + # define _PATH_DEFPATH "/usr/bin:/bin" ++#endif ++ ++#ifndef _PATH_DEFPATH_ROOT ++# define _PATH_DEFPATH_ROOT "/usr/sbin:/usr/bin:/sbin:/bin" + #endif +--- cron-3.0pl1.orig/popen.c ++++ cron-3.0pl1/popen.c +@@ -29,9 +29,14 @@ + #endif /* not lint */ + + #include "cron.h" +-#include ++#include ++ ++#if defined(BSD) || defined(POSIX) ++# include ++#endif + + ++#define MAX_ARGS 100 + #define WANT_GLOBBING 0 + + /* +@@ -43,14 +48,15 @@ + static int fds; + + FILE * +-cron_popen(program, type) ++cron_popen(program, type, e) + char *program, *type; ++ entry *e; + { + register char *cp; + FILE *iop; + int argc, pdes[2]; + PID_T pid; +- char *argv[100]; ++ char *argv[MAX_ARGS + 1]; + #if WANT_GLOBBING + char **pop, *vv[2]; + int gargc; +@@ -58,7 +64,7 @@ + extern char **glob(), **copyblk(); + #endif + +- if (*type != 'r' && *type != 'w' || type[1]) ++ if ((*type != 'r' && *type != 'w') || type[1]) + return(NULL); + + if (!pids) { +@@ -72,9 +78,10 @@ + return(NULL); + + /* break up string into pieces */ +- for (argc = 0, cp = program;; cp = NULL) ++ for (argc = 0, cp = program; argc < MAX_ARGS; cp = NULL) + if (!(argv[argc++] = strtok(cp, " \t\n"))) + break; ++ argv[MAX_ARGS] = NULL; + + #if WANT_GLOBBING + /* glob each piece */ +@@ -114,6 +121,20 @@ + } + (void)close(pdes[1]); + } ++ /* Lose root privilege */ ++ setgid(e->gid); ++# if defined(BSD) || defined(POSIX) ++ initgroups(env_get("LOGNAME", e->envp), e->gid); ++# endif ++ if (setuid(e->uid) !=0) { ++ char msg[256]; ++ snprintf(msg, 256, "popen: setuid(%lu) failed: %s", ++ (unsigned long) e->uid, strerror(errno)); ++ log_it("CRON",getpid(),"error",msg); ++ exit(ERROR_EXIT); ++ } ++ chdir(env_get("HOME", e->envp)); ++ + #if WANT_GLOBBING + execvp(gargv[0], gargv); + #else +--- cron-3.0pl1.orig/user.c ++++ cron-3.0pl1/user.c +@@ -52,7 +52,7 @@ + user *u; + entry *e; + int status; +- char **envp; ++ char **envp, **tenvp; + + if (!(file = fdopen(crontab_fd, "r"))) { + perror("fdopen on crontab_fd in load_user"); +@@ -63,14 +63,25 @@ + + /* file is open. build user entry, then read the crontab file. + */ +- u = (user *) malloc(sizeof(user)); +- u->name = strdup(name); ++ if ((u = (user *) malloc(sizeof(user))) == NULL) { ++ errno = ENOMEM; ++ return NULL; ++ } ++ if ((u->name = strdup(name)) == NULL) { ++ free(u); ++ errno = ENOMEM; ++ return NULL; ++ } + u->crontab = NULL; + + /* + * init environment. this will be copied/augmented for each entry. + */ +- envp = env_init(); ++ if ((envp = env_init()) == NULL) { ++ free(u->name); ++ free(u); ++ return NULL; ++ } + + /* + * load the crontab +@@ -89,7 +100,13 @@ + } + break; + case TRUE: +- envp = env_set(envp, envstr); ++ if ((tenvp = env_set(envp, envstr))) { ++ envp = tenvp; ++ } else { ++ free_user(u); ++ u = NULL; ++ goto done; ++ } + break; + } + } +--- cron-3.0pl1.orig/debian/README.anacron ++++ cron-3.0pl1/debian/README.anacron +@@ -0,0 +1,14 @@ ++To ease coordination with anacron, the invocation of the run-parts for ++the /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly directories ++was changed to the form ++ ++ test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily ++ ++What this means is that if anacron has been installed, it will ++be responsible for running those scripts. This is the standard ++configuration of anacron: if you simply install both cron and anacron, ++things will work as expected. ++ ++However, if you have modified your anacron configuration ++(/etc/anacrontab), you may need to re-adjust it in order to accommodate ++this change. +--- cron-3.0pl1.orig/debian/README.debian ++++ cron-3.0pl1/debian/README.debian +@@ -0,0 +1,38 @@ ++cron for DEBIAN ++---------------------- ++ ++This is the Debian GNU/Linux prepackaged version of Paul Vixie's cron ++subsystem. ++ ++This package was put together by Ian Jackson , ++from the standard sources to 3.0pl1, as posted to comp.sources.unix. ++Ian obtained them from ++src.doc.ic.ac.uk:/usenet/comp.sources.unix/volume27/vixie-cron. ++ ++The changes are essentially the configuration for Debian Linux in the ++Makefile and pathnames.h, and the addition of support for the Debian ++package maintenance scheme in the form of various files (now in the ++debian directory). ++ ++The `checksecurity' script installed in /usr/sbin in the binary distribution ++(found in ./debian in the source) was (probably) written by Ian Jackson, ++and has been modified by Steve Greenland. ++ ++File locations that are different than that indicated in ++the cron distributions README: ++ ++user crontabs: /var/spool/cron/crontabs/* ++log file: /var/log/cron.log ++allow file: /etc/cron.allow ++deny file: /etc/cron.deny ++ ++Note that the location of the log file can be changed via syslog.conf. ++ ++1998: Added reading of crontab fragments from /etc/cron.d to support ++other Debian package cron requirements. Files follow /etc/crontab ++format (i.e. with user field), must meet run-parts(8) naming ++convention (alphanumeric, underscore, hyphen only). ++ ++This package is now maintained by Steve Greenland ++. ++ +--- cron-3.0pl1.orig/debian/changelog ++++ cron-3.0pl1/debian/changelog +@@ -0,0 +1,427 @@ ++cron (3.0pl1-72) unstable; urgency=low ++ ++ * Add type usbdevfs to skipped "file systems" (this is /proc/bus/usb) ++ (closes: #113186,#113187) ++ * Removed 'xfs' from list of skipped file system types. Unfortunately, ++ it appears to be used by both the arla network file system and the SGI ++ XFS filesystem, and I must make the conservative choice. (closes: #113234) ++ * Remove extra diff in checksecurity. (closes: 113950) ++ * Add type none to skipped "file systems" (--bind mounts) (closes: #111395) ++ ++ -- Steve Greenland Mon, 1 Oct 2001 07:46:34 -0500 ++ ++cron (3.0pl1-71) unstable; urgency=medium ++ ++ * Fixed nasty typo in checksecurity. (closes: #112156) ++ * Note to release manager: either -71 should go into woody, ++ or only -69. ++ ++ -- Steve Greenland Thu, 13 Sep 2001 16:39:25 -0500 ++ ++cron (3.0pl1-70) unstable; urgency=medium ++ ++ * Catch full disk when writing new crontab. (closes: #110612) ++ * Don't modify backup file modes if no change (to prevent misleading ++ time mods). (closes: #104093) ++ * Remove obsolete reference to /bin/mail in crontab.5. (closes: #110962) ++ * Add Marc Merlin's checksecurity patches with more configuration ++ options. (closes: #89547, #63445) ++ * Make all setuid.{today,yesterday,etc.} files group adm. (closes: #109520) ++ ++ -- Steve Greenland Fri, 7 Sep 2001 18:27:37 -0500 ++ ++cron (3.0pl1-69) unstable; urgency=low ++ ++ * Don't run checksecurity on any partition mount nosuid or noexec. ++ (closes:#98160) ++ * Don't run on devpts, either. ++ ++ -- Steve Greenland Sun, 20 May 2001 13:48:15 -0500 ++ ++cron (3.0pl1-68) unstable; urgency=low ++ ++ * Finally tracked down the problem with @{reboot,hourly,etc.} commands ++ in the root crontabs (/etc/crontab, /etc/cron.d/*) (closes:#62141, #84727) ++ * Minor cosmetic cleanup in lost+found output, from Matthijs Melchior ++ (closes:#88861) ++ ++ -- Steve Greenland Sat, 19 May 2001 17:37:52 -0500 ++ ++cron (3.0pl1-67) unstable; urgency=high ++ ++ * With crontab -e, don't give uid root on re-edit. ++ ++ -- Steve Greenland Sun, 6 May 2001 11:41:50 -0500 ++ ++cron (3.0pl1-66) unstable; urgency=low ++ ++ * The "Julian Gilbey has been spending too much time proofreading" ++ release. Remove hyphens in cron.init (closes:#91323) ++ * change log_it() to open and close syslog every time, remove SIGPIPE ++ catcher, etc., all in attempt to keep PAM happy. ++ * Added original location to copyright file (closes:#88507) ++ * Allocate username dynamically in crontab.c (closes:#89040,#62268) ++ * Remove pam_limits.so from cron.pam file. ++ ++ -- Steve Greenland Tue, 27 Mar 2001 18:04:16 -0600 ++ ++cron (3.0pl1-65) unstable; urgency=high ++ ++ * Close reboot file /var/run/crond.reboot after creating it, duh. Leaving ++ it open allowed possible writes from cron jobs. ++ ++ -- Steve Greenland Mon, 26 Feb 2001 09:47:34 -0600 ++ ++cron (3.0pl1-64) unstable; urgency=high ++ * The "President's Birthday" release. ++ * Add checks for setuid() failures, to avoid running user jobs as root. ++ (closes:#85609, #86775) ++ * Add portability flag -P to df (in /etc/cron.daily/standard) to ++ avoid problem with long device names. (closes:#86851) ++ * Convert from suidmanager to dpkg --statoverride. ++ * Remove unnecessary dependency on bsdutils (it's Essential) ++ * Change compat.h to not cause inclusion of sys/time.h (instead of ++ time.h), due to recent change in glibc. Why it was doing this, I have ++ no idea. ++ ++ -- Steve Greenland Wed, 21 Feb 2001 16:26:57 -0600 ++ ++cron (3.0pl1-63) unstable; urgency=medium ++ ++ * Fix mistaken diagnostic in crontab ("Reached end of file ++ while reading environment"). ++ * Fix "Too many arguments to [" error in postinst. (closes:#79725) ++ ++ -- Steve Greenland Sun, 28 Jan 2001 12:00:55 -0600 ++ ++cron (3.0pl1-62) unstable; urgency=medium ++ ++ * Change tracking of crontab directory mod times to deal with directories ++ with mtimes in the future. Thanks to Florian Lohoff for tracking down ++ the cause of this rare yet long-standing bug. ++ (closes:#51202, #57356, #64198, #77353) ++ * Run @reboot jobs only on reboot instead of cron restart. ++ (closes:#74762, #77563) ++ * Clarify which directory the lost+found files are in. ++ * Protect against reading other people's crontabs via temp file symlink ++ in crontab -e. ++ ++ -- Steve Greenland Sat, 27 Jan 2001 17:01:43 -0600 ++ ++cron (3.0pl1-61) unstable; urgency=high ++ ++ * Fix usage message in cron.init. ++ * Use pam only on non-Hurd. (closes:#75408) ++ * Move dpkg status backups to /var/backups. ++ * Apply security fix for temp file attack, thanks to Daniel Jacobowitz. ++ * Made /etc/pam.d/cron a conffile. ++ ++ -- Steve Greenland Fri, 17 Nov 2000 16:06:03 -0600 ++ ++cron (3.0pl1-60) unstable; urgency=low ++ ++ * Re-set log to LOG_CRON after PAM changes it to LOG_AUTH.(closes:#70028) ++ ++ -- Steve Greenland Thu, 31 Aug 2000 14:37:44 -0500 ++ ++cron (3.0pl1-59) unstable; urgency=low ++ ++ * Fixed typo of @cmp in standard.daily (closes:#69921,#69937,#69956) ++ * Add /etc/pam.d/cron, using standard Unix authorizations (closes:#69939) ++ ++ -- Steve Greenland Fri, 25 Aug 2000 14:02:47 -0500 ++ ++cron (3.0pl1-58) unstable; urgency=low ++ ++ * Fix use of PATH_MAX/MAXPATHLEN in database.c and other HURD issues ++ (closes:#64382) ++ * Look in all (ext2) lost+found directories, not just ++ /lost+found (closes:#66629) ++ * Cosmetic changes to daily/standard (closes:#65078) ++ * Use diff -u0 in checksecurity to avoid useless context (closes:#60919) ++ * Note uppercasing of child processes in cron.8 (closes:#62103) ++ * Added Topi Mitterands PAM support patch - Thanks! (closes:#68366,#67586) ++ * Fix segfault in crontab -l (closes:#53735) ++ * Added Build-Depends. ++ * Added support for DEB_BUILD_OPTIONS, changed default compile to '-02 -Wall' ++ * Fixed various complaints generated by -Wall :-), except 'rcsid unused' ++ ++ -- Steve Greenland Wed, 23 Aug 2000 16:20:39 -0500 ++ ++cron (3.0pl1-57) frozen unstable; urgency=low ++ ++ * Release Manager: 61296 is RC bug; ++ * Change lockfile-progs "Depends" to "Suggests" (policy violation), ++ only try to use lockfile-create in /etc/cron.daily/standard if it is ++ installed (closes:#61296) ++ ++ -- Steve Greenland Wed, 29 Mar 2000 20:12:06 -0600 ++ ++cron (3.0pl1-56) frozen unstable; urgency=medium ++ ++ * Release Manager: 59115 is RC bug. ++ * set backup password files to root-only rw (closes:#59115) ++ * Fixed missing ntfs in checksecurity.conf (closes:#56939) ++ ++ -- Steve Greenland Mon, 28 Feb 2000 19:16:20 -0600 ++ ++cron (3.0pl1-55) unstable; urgency=low ++ ++ * Changed __linux feature checks to __linux__ (closes:#50240) ++ * Added '-u' to diff in checksecurity (closes:#51679) ++ * Moved checksecurity LOGDIR (formerly LOG) setting to config ++ file (closes:#49683) ++ * Fixed removal of lockfile in cron.daily/standard. ++ ++ -- Steve Greenland Sat, 18 Dec 1999 18:53:29 -0600 ++ ++cron (3.0pl1-54) unstable; urgency=low ++ ++ * Fixed spelling in checksecurity.8 (closes:#45281) ++ * Only look in /lost+found if it exists (closes:#46389) ++ * Only run @weekly jobs once a week (was looking at dom with OR ++ rather than AND.) (closes:#49437) ++ * Don't run more than one instance of /etc/cron.daily/standard (closes:#45487) ++ * Removed extra generation of TSTP in crontab -e. (closes:#48542) ++ ++ -- Steve Greenland Sun, 7 Nov 1999 15:09:48 -0600 ++ ++cron (3.0pl1-53) unstable; urgency=medium ++ ++ * Applied OpenBSD patches supplied Topi Miettinen. Big change is ++ better handling of timekeeping (in particular, changes to/from daylight ++ savings time) (closes:#8499). ++ * Redirect stdin, stdout, and stderr to /dev/null. ++ (closes:#37189, #23231, #30653). ++ * Fixed bit_set()/bit_nset() confusion that caused @hourly to not work, so ++ that functionality is now documented (closes:#43282). ++ * Changed warrantee to warranty in debian/copyright (but it's still ++ misspelled in the source files) (closes:#40312) ++ * Adjust checksecurity and cron_daily/standard to get consistent owner/perms ++ on /var/log/setuid* files. (closes:#15295) ++ * Add 'coda' to the list of nfs/afs like file systems in checksecurity.conf ++ (closes:#29909) ++ * Fix version comparison to use dpkg --compare-versions, which is what I ++ should have done in the first place (closes:#42454) ++ * Add 'xfs' to the list of nfs/afs like file systems in checksecurity.conf, ++ as it appears that xfs==arla and arla==xfs. If there are other file systems ++ that show up as 'xfs', please let me know (closes:#37523) ++ * Don't rotate wtmp and btmp (closes:#42301). ++ ++ -- Steve Greenland Sat, 11 Sep 1999 18:42:37 -0500 ++ ++cron (3.0pl1-52) unstable; urgency=high ++ ++ * Patch to fix "Reverse DoS": user could send arbitrary options to ++ sendmail via MAILTO variable. Fix by not allowing spaces or leading ++ dashes in MAILTO, and run sendmail as user, not root. ++ ++ -- Steve Greenland Sun, 29 Aug 1999 21:50:28 -0500 ++ ++cron (3.0pl1-51) unstable; urgency=low ++ ++ * Changed default of "crontab -l" to NOT list the extra header lines. May ++ obtain original behaviour by setting "CRONTAB_NOHEADER=N". ++ * Fixed comment in misc.c that accidentally cause the SIGPIPE handler to ++ be reset more often than necessary. ++ * Don't checksecurity on ntfs file systems (closes:#33079) ++ * Added '-i' flag to sendmail command (closes:#36338) ++ * Added check for files in /lost+found (closes:#29791) ++ * Added preferential invocation of anacron for cron.{daily,weekly,monthly} ++ ++ -- Steve Greenland Thu, 27 May 1999 17:37:54 -0500 ++ ++cron (3.0pl1-50) frozen unstable; urgency=low ++ ++ * Fixed rules file *again* so that crontab suidness doesn't get ++ stepped on by debhelper under certain kernel versions. ++ ++ -- Steve Greenland Sat, 9 Jan 1999 14:17:09 -0600 ++ ++cron (3.0pl1-49) frozen unstable; urgency=low ++ ++ * Check for /etc/shadow and /etc/gshadow separately (closes:Bug#30232) ++ ++ -- Steve Greenland Wed, 2 Dec 1998 21:30:00 -0600 ++ ++cron (3.0pl1-48) frozen unstable; urgency=low ++ ++ * Fixed rules file so that crontab doesn't get suid bit removed by latest ++ version of debhelper. (closes:Bug#29683) ++ ++ -- Steve Greenland Mon, 30 Nov 1998 21:10:00 -0600 ++ ++cron (3.0pl1-47) frozen unstable; urgency=high ++ ++ * Removed close of {stdin,stdout,stderr}, as it appears that ++ some cron users expect it. ++ ++ -- Steve Greenland Mon, 2 Nov 1998 09:25:44 -0600 ++ ++Cron (3.0pl1-46) frozen unstable; urgency=medium ++ ++ * changed mention of /var/spool/crontabs to /var/spool/cron/crontabs, and ++ added example /etc/crontab. (closes:Bug#28458,Bug#23101) ++ * Incorporated buffer overflow patches. (closes:Bug#26705,Bug#26749) ++ * Added backup of /etc/shadow and /etc/gshadow in cron.daily/standard. ++ (closes:Bug#25853) ++ * Better daemonization (close stdin,stdout,stderr). (closes:Bug#23231) ++ * Do cron.daily a little earlier, try to avoid overlap with cron.weekly. ++ (closes:Bug#23023) ++ * Added note in crontab.1 and crontab.5 about trailing newline requirement. ++ (closes:Bug#16132) ++ ++ -- Steve Greenland Sun, 1 Nov 1998 19:10:45 -0600 ++ ++cron (3.0pl1-45) frozen unstable; urgency=high ++ ++ * Updated README and README.Debian w.r.t. file locations. ++ * Updated crontab.1 w.r.t. location of allow and deny files. ++ * Fixed problem in postinst when new install (instead of upgrade) ++ (closes:Bug#21426) ++ * Smarter algorithm for checking /etc/cron.d for changes, no longer ++ spins up laptop disks every minute. Thanks to Alexander "Shurik" ++ Shumakovitch for the fix. ++ * Re-did checksecurity to only report NFS/AFS insecure mounts ++ instead of running find on them (suggestion from Gregory Stark). ++ ++ -- Steve Greenland Sun, 26 Apr 1998 13:41:51 -0500 ++ ++cron (3.0pl1-44) unstable; urgency=low ++ ++ * Fixed standards version reference. ++ * Fixed init script "comment", sigh. Let this be a warning to you: NEVER EVER ++ change a file with doing a complete test, even if it is "just a comment". ++ (closes:Bug#19466,Bug#19492,Bug#19479,Bug#19595,Bug#19725,Bug#19840, ++ Bug#19845,Bug19852). Sheesh. ++ ++ -- Steve Greenland Tue, 17 Mar 1998 21:55:03 -0600 ++ ++cron (3.0pl1-43) unstable; urgency=medium ++ ++ * Removed support for TMPDIR. This is due to the problem it causes ++ with emacs -- emacs does different things with it's backup files ++ depending on whether or not the file is in /tmp. Emacs probably ought ++ to use TMPDIR instead of /tmp in its check. I've opened a "wishlist" ++ bug for crontab to support TMPDIR. ++ (closes: Bug#15985) ++ * When USE_SIGCHLD is defined, before running user process, set handling ++ for SIGCHLD to SIG_DFL, not SIG_IGN. Despite documentation that the ++ default for SIGCHLD is ignore, the behaviour is different. ++ (closes:Bug#17564,Bug#9075,Bug#16436,Bug#17814) ++ * Moved allow and deny files from /var/spool/cron to /etc/cron.{allow,deny} ++ (closes:Bug#14970) ++ * filenames in /etc/cron.d must comply with run-parts naming convention - ++ alpha-numeric, underscore, or hyphen. This ensures that conffile ++ remains (e.g. package.dpkg-dist) files don't get run. ++ * removed cronanacron command from /etc/crontab and distribution -- ++ replaced by /etc/cron.d/anacron file (from anacron package, not cron). ++ * Documented /etc/cron.d dir in manpage and readme.debian ++ * modified checksecurity.conf to not check auto file systems. ++ (closes:Bug#8702) ++ * crontab -u `whoami` now works. (closes:Bug#8702) ++ * documented CRONTAB_NOHEADER in crontab.1 ++ * /etc/crontab now uses run-parts(8) --report switch. (closes:Bug#18273) ++ * fixed initialization of oact in misc.c. (closes:Bug#17134) ++ * converted to use debhelper rather than debmake. ++ * changed date format in checksecurity so that we don't get false positives ++ after six months. (closes:Bug#19025) ++ * remove /etc/cron.{allow,deny} on purge ++ ++ -- Steve Greenland Mon, 9 Mar 1998 01:31:13 -0600 ++ ++cron (3.0pl1-42) unstable; urgency=low ++ ++ * Don't output header on 'crontab -l' if CRONTAB_NOHEADER is 'Y' (Bug#15642) ++ * Read files in /etc/cron.d in addition to /etc/crontab (Bug#16628, ++ Bug#16617) ++ ++ -- Steve Greenland Sun, 11 Jan 1998 18:32:26 -0600 ++ ++cron (3.0pl1-41) unstable; urgency=low ++ ++ * Updated crontab to use /usr/bin/editor if EDITOR and VISUAL undefined. ++ * Added support for TMPDIR from crontab (Bug#9309) ++ * Compress /usr/doc/cron/changelog.Debian -- this time for sure! (Bug#15296) ++ ++ -- Steve Greenland Fri, 28 Nov 1997 13:47:03 -0600 ++ ++cron (3.0pl1-40) unstable; urgency=low ++ ++ * Correct directory reference in standard.monthly to /var/log ++ (Bug#12315, Bug#13466) ++ * Added -DUSE_SIGCHLD to defs, needed for alpha (Bug#12855,Bug#8611). ++ May also fix Bug#9075. ++ * Changed check for suidmanager (Bug#9326) ++ * Checksecurity no longer checks fat or vfat filesystems (Bug#8845, ++ Bug#13574) ++ * Changed spaces in crontab to , appearance only (Bug#13369) ++ * Removed bashism from standard.daily and checksecurity (Bug#9908, ++ Bug#9909) ++ * Added CHECKSECURITY_DISABLE flag to checksecurity.conf. ++ * Get the changelog names correct (Bug#14618) ++ * Correct day-of-month and month ranges in crontab.5 (Bug#15073) ++ ++ -- Steve Greenland Sun, 23 Nov 1997 22:58:05 -0600 ++ ++cron (3.0pl1-39) unstable; urgency=low ++ ++ * Added configuration variable to eliminate error messages from ++ checksecurity's find command ++ * Better integration with anacron: suggest anacron, call anacron ++ on a regular basis so that it can keeps it's status up-to-date. New ++ file /usr/sbin/cronanacron. ++ * Call savelog for /var/adm/btmp from /etc/cron.monthly/standard. ++ ++ -- Steve Greenland Sun, 24 Aug 1997 18:52:55 -0500 ++ ++cron (3.0pl1-38) stable unstable; urgency=low ++ ++ * When upgrading from -36 or -36.1, stop old cron daemon ++ in preinst, because the prerm's in those versions doesn't. ++ * Follow console message standard. ++ ++ -- Steve Greenland Sat, 18 Jan 1997 15:34:42 -0600 ++ ++cron (3.0pl1-37) stable unstable; urgency=medium ++ ++ * Corrected postinst,prerm, and postrm scripts -- Installs and ++ removes rc.d links, and re-starts cron after install. ++ * More fixes from the BSD crew, sent to me by Marek Michalkiewicz: mostly ++ checks for null pointers, but also a few Makefile fixes, and at least ++ one potential buffer overrun (but I know of no exploits). ++ * Left in suidmanager stuff, but corrected default permission to 4755, ++ per Debian standards. ++ * Added CHANGES file (as /usr/doc/cron/changelog.upstream.gz) to ++ distribution. Added upstream README to distribution. ++ * Moved files out of ./debian/extra into ./debian because dpkg-source ++ cannot deal with createing directories. Hmmph. ++ * Removed filereaper reference from standard.daily ++ ++ -- Steve Greenland Sun, 5 Jan 1997 18:23:14 -0600 ++ ++cron (3.0pl1-36.1) stable unstable; urgency=HIGH ++ ++ * Mended `find' invocation in debian/rules. ++ * Serious security hole (buffer overrun) fixed. ++ * Silly suidmanager stuff added by debmake. Pah. ++ ++ -- Jon Rabone Wed, 18 Dec 1996 21:38:33 +0000 ++ ++cron (3.0pl1-36) frozen unstable; urgency=low ++ ++ * Removed DEBUG logging about SIGPIPE -- it's generated by every ++ child once syslogd has been restarted. ++ ++ -- Steve Greenland Mon, 2 Dec 1996 01:41:16 -0600 ++ ++cron (3.0pl1-35) frozen unstable; urgency=low ++ ++ * Converted to new source format ++ * Added code in misc.c to catch SIGPIPE and re-open syslog. This ++ is all in #if defined(DEBIAN), and should be removed when syslog(3) ++ is fixed. Also added -DDEBIAN to build commands in Makefile. ++ ++ -- Steve Greenland Sun, 1 Dec 1996 16:21:52 -0600 ++ ++ +--- cron-3.0pl1.orig/debian/checksecurity ++++ cron-3.0pl1/debian/checksecurity +@@ -0,0 +1,87 @@ ++#!/bin/sh ++# Security checks script - run daily out of the system crontab ++ ++set -e ++ ++PATH=/sbin:/bin:/usr/sbin:/usr/bin ++ ++ ++umask 027 ++cd / ++ ++. /etc/checksecurity.conf ++ ++if [ "$CHECKSECURITY_DISABLE" = "TRUE" ] ; then ++ exit ++fi ++ ++if [ -z "$CHECKSECURITY_GREPOUT" ]; then ++ CHECKSECURITY_GREPOUT="$^" ++fi ++ ++TMPSETUID=${LOGDIR:=/var/log}/setuid.new.tmp ++TMPDIFF=${LOGDIR:=/var/log}/setuid.diff.tmp ++ ++# ++# Check for NFS/AFS mounts that are not nosuid/nodev ++# ++if [ ! "$CHECKSECURITY_NONFSAFS" = "TRUE" ] ; then ++ # temporarily disable error exit, as grep may give errors if no nfs/afs ++ # are mounted. ++ set +e ++ nfssys=`mount | grep -E 'nfs|afs' | grep -vE '\(.*(nosuid|noexec).*nodev.*\)'` ++ nfssyscnt=`echo $nfssys |grep "[a-z]"| wc -l` ++ set -e ++ if [ $nfssyscnt -gt 0 ] ; then ++ echo "The following NFS or AFS filesystems are mounted insecurely:" ++ echo "" ++ echo $nfssys ++ echo "" ++ echo "If this is intentional and you have supreme confidence in the" ++ echo "security of the server for these file systems, you may disable" ++ echo "this message by editing the value of CHECKSECURITY_NONFSAFS in" ++ echo "the file /etc/checksecurity.conf." ++ fi ++fi ++ ++if [ "$CHECKSECURITY_NOFINDERRORS" = "TRUE" ] ; then ++ exec 9>&2 ++ exec 2>/dev/null ++fi ++ ++ ++# This is the only way to pass '*' through a variable (NODEVDIRS) -- Marc ++set -o noglob ++find `mount | grep -vE "$CHECKSECURITY_FILTER" | cut -d ' ' -f 3` \ ++ -xdev \( $CHECKSECURITY_PATHFILTER \) -prune -o \ ++ \( -type f -perm +06000 -o \ ++ \( \( -type b -o -type c \) -a -not \( $CHECKSECURITY_DEVICEFILTER \) \) \) \ ++ -printf "%8i %5m %3n %-10u %-10g %9s %t %h/%f\n" | sort >$TMPSETUID ++set +o noglob ++ ++if [ "$CHECKSECURITY_NOFINDERRORS" = "TRUE" ] ; then ++ exec 2>&9 ++fi ++ ++cd $LOGDIR ++ ++test -f setuid.today || touch setuid.today ++ ++if cmp -s setuid.today $TMPSETUID >/dev/null ++then ++ : ++else ++ diff -u0 setuid.today $TMPSETUID >> $TMPDIFF || [ $? = 1 ] ++ echo "`hostname` changes to setuid programs and devices:" ++ cat $TMPDIFF ++ ++ if [ `cat $TMPDIFF | wc -l` -gt 0 -a ! -z "$CHECKSECURITY_EMAIL" ]; then ++ /usr/bin/mail -s "Setuid changes for `hostname -f` on `date '+%D %T'`" $CHECKSECURITY_EMAIL < $TMPDIFF ++ fi ++ ++ mv setuid.today setuid.yesterday ++ mv $TMPSETUID setuid.today ++ chown root.adm setuid.today ++fi ++rm -f $TMPDIFF ++rm -f $TMPSETUID +--- cron-3.0pl1.orig/debian/checksecurity.8 ++++ cron-3.0pl1/debian/checksecurity.8 +@@ -0,0 +1,145 @@ ++.\" -*- nroff -*- ++.TH CHECKSECURITY 8 "2 February 1997" "Debian Linux" ++.SH NAME ++checksecurity \- check for changes to setuid programs ++.SH SYNOPSIS ++.B checksecurity ++.SH DESCRIPTION ++The ++.B checksecurity ++command scans the mounted files systems (subject to the filter defined ++in /etc/checksecurity.conf) and compares the list of setuid programs to the ++list created on the previous run. Any changes are printed to standard ++output. Also, it generates a list of ++.I nfs ++and ++.I afs ++filesystems that are mounted insecurely (i.e. they are missing the ++.I nodev ++and either the ++.I noexec ++or ++.I nosuid ++flags). ++.PP ++.B checksecurity ++is run by ++.B cron ++on a daily basis, and the output stored in /var/log/setuid.changes. ++.SH CONFIGURATION ++The ++.B checksecurity.conf ++file defines several configuration variables: ++.BR CHECKSECURITY_FILTER , ++.BR CHECKSECURITY_NOFINDERRORS , ++.BR CHECKSECURITY_DISABLE , ++.BR CHECKSECURITY_NONFSAFS , ++.BR CHECKSECURITY_EMAIL , ++.BR CHECKSECURITY_DEVICEFILTER , ++.BR CHECKSECURITY_PATHFILTER , ++and ++.BR LOGDIR . ++Each is described below. ++.PP ++The ++.B CHECKSECURITY_FILTER ++environment variable which is the argument of 'grep -vE' applied to ++the output of the ++.B mount ++command. In other words, the value of ++.B CHECKSECURITY_FILTER ++is a regular expression that removes matching lines from those ++file systems that will be scanned. The default value removes ++all file systems of type ++.I proc, msdos, iso9660, ncpfs, nfs, afs, ++.I smbfs, auto, ntfs, coda ++file systems, ++anything mounted on /dev/fd*, anything mounted ++on /mnt or /amd, and anything mounted with option nosuid or noexec. ++.PP ++The ++.B checksecurity.conf ++file is sourced from ++.B checksecurity, ++so you could do some fairly tricky things to define ++.BR CHECKSECURITY_FILTER . ++.PP ++The ++.B CHECKSECURITY_NOFINDERRORS ++environment variable, if set to the literal "TRUE", disables ++find errors from checksecurity (actually, it re-routes them to ++.B /dev/null ++). ++.PP ++The ++.B CHECKSECURITY_DISABLE ++environment variable, if set to the literal "TRUE", disables ++checksecurity entirely, as a sop to those who think it's safe to allow ++random mounting of NFS and AFS disks without the nosuid or noexec flags. ++.PP ++The ++.B CHECKSECURITY_NONFSAFS ++environment variable, if set to the literal "TRUE", disables the message about ++.I nfs ++and ++.I afs ++file systems that are mounted without the ++.I nodev ++and either the ++.I noexec ++or ++.I nosuid ++options. ++.PP ++If set, the ++.B CHECKSECURITY_EMAIL ++variable defines who is sent a copy of the setuid.changes file. ++.PP ++The ++.B CHECKSECURITY_DEVICEFILTER ++variable specifies a ++.B find ++clause for which matching block and character device files will not be ++monitored for changing owners and permissions. For example, if you ++didn't want to check for permission changes on tty device files ++beneath /dev, you could set the following: ++.PP ++.RS ++CHECKSECURITY_DEVICEFILTER='-path /dev/tty*' ++.RE ++.PP ++Note that any added or modified suid programs under that path would ++still be detected. If you want to specify multiple expressions, ++separate them with '-o', but there is no need to surround the whole ++clause with parentheses. To disable this filter, specify it as ++'-false' (which is the default). ++.PP ++The ++.B CHECKSECURITY_PATHFILTER ++variable specifies a ++.B find ++clause which will be pruned from the search path. ++.B This means that the entire subtree will be completely skipped. ++Thus, specifying ++.PP ++.RS ++CHECKSECURITY_PATHFILTER='-path /var/ftp' ++.RE ++.PP ++then the entire /var/ftp tree will be skipped. To disable this filter, ++specify it as '-false' (which is the default). ++.PP ++.B LOGDIR ++sets the name of the directory which stores the files which track ++the permission and ownership changes. By default, they are in ++.BR /var/log . ++.SH FILES ++.TP ++.I /etc/checksecurity.conf ++checksecurity configuration file ++.TP ++.I /var/log/setuid.today ++setuid files from the most recent run ++.TP ++.I /var/log/setuid.yesterday ++setuid files from the previous run +--- cron-3.0pl1.orig/debian/checksecurity.conf ++++ cron-3.0pl1/debian/checksecurity.conf +@@ -0,0 +1,126 @@ ++# ++# This is the checksecurity script configuration file ++# ++# These configuration variables mabye set: ++# ++# CHECKSECURITY_FILTER ++# CHECKSECURITY_NOFINDERRORS ++# CHECKSECURITY_DISABLE ++# CHECKSECURITY_NONFSAFS ++# CHECKSECURITY_EMAIL ++# CHECKSECURITY_DEVICEFILTER ++# CHECKSECURITY_PATHFILTER ++# LOGDIR ++# ++# Each is described in it's own section below -- search for #### ++# as a section divider. ++# ++#### ++# ++# The CHECKSECURITY_FILTER variable is used as an argument to ++# "grep -vE" to filter lines from the output of the "mount" ++# command. ++# ++# The default is not check the following file systems: ++# ++# type proc ++# type msdos ++# type iso9660 ++# type ncpfs ++# type smbfs ++# type nfs ++# type afs ++# type auto (They'll typically be picked up on the nfs branch) ++# type ntfs ++# type coda (similar to afs) ++# type usbdevfs ++# type none (--bind mounts) ++# ++# floppies (i.e. /dev/fd) ++# anything on /mnt or /amd ++# ++# Note that behaviour for nfs/afs has changed as of release -45. We ++# no longer run find across nfs/afs disks; instead we simply report ++# afs/nfs disks that are mounted insecurely (without -onosuid|noexec,nodev). ++# You can disable this report by going setting the CHECKSECURITY_NONFSAFS ++# variable below. ++# ++# Use temp variables to build up CHECKSECURITY_FILTER, to make it ++# a little more readable. ++# ++CS_NFSAFS='(nfs|afs|coda)' ++# Uncomment the next line to get the old behaviour. ++#CS_NFSAFS='(nfs|afs) \(.*(nosuid|noexec).*nodev.*\)' ++# ++CS_TYPES=' type (auto|proc|msdos|fat|vfat|iso9660|usbdevfs|ncpfs|smbfs|ntfs|devpts|none|'$CS_NFSAFS')' ++# ++CS_OPTS='\(.*(nosuid|noexec).*\)' ++# ++CS_DEVS='^/dev/fd' ++# ++CS_DIRS='on /mnt' ++# ++CHECKSECURITY_FILTER="$CS_TYPES|$CS_OPTS|$CS_DEVS|$CS_DIRS" ++# ++# Clear the temporary variables ++# ++unset CS_NFSAFS CS_TYPES CS_DIRS CS_OPTS ++# ++#### ++# ++# The CHECKSECURITY_NOFINDERRORS, if set to "TRUE" (case sensitive), ++# redirects any errors from the find command used in checksecurity ++# to /dev/null. ++# ++CHECKSECURITY_NOFINDERRORS="FALSE" ++#### ++# ++# The CHECKSECURITY_DISABLE, if set to "TRUE" (case sensitive), ++# disables the running of checksecurity ++# ++CHECKSECURITY_DISABLE="FALSE" ++#### ++# ++# The CHECKSECURITY_NONFSAFS, if set to "TRUE" (case sensitive), ++# disables the message about insecurely mounted nfs/afs disks ++# ++CHECKSECURITY_NONFSAFS="FALSE" ++#### ++# ++# If the CHECKSECURITY_EMAIL is set, the report is mailed to the given ++# address. Note that if you set this, it is *assumed* that you have ++# /usr/bin/mail that accepts -s; the mailx package provides this; or ++# you can install mutt and create a link, or some other ++# alternative. No, I'm not going to fix it to write the appropriate ++# headers and use sendmail (although I'd consider patch), nor am I ++# going to add a {Depends|Recommends|Suggests} to the cron package. ++# Do not submit bugs about this unless you include the above mentioned ++# patch. You enabled this option -- you take responsibility. ++# ++#CHECKSECURITY_EMAIL="root" ++#### ++# ++# The CHECKSECURITY_DEVICEFILTER lets you tell find not to report ++# devices in those directories (if you choose the daily Emails, ++# devices like /dev/pts/?, /dev/tty?, or /dev/urandom will change ++# often and clutter your mailbox) Note that these directories are ++# still searched for suid executables. Also not that *something* must ++# be defined, which is why the default is "-false". ++# Examples: ++#CHECKSECURITY_DEVICEFILTER="-path /dev/*" ++#CHECKSECURITY_DEVICEFILTER="-path /dev/* -o -path /home/ftp/dev/*" ++CHECKSECURITY_DEVICEFILTER="-false" ++#### ++# The CHECKSECURITY_PATHFILTER variable lets you set a pattern of ++# pathnames that you don't want to check at all. You hopefully know ++# what you're doing if you do this :-). ++# Example: ++# CHECKSECURITY_PATHFILTER="-path /dev/rd* -o -path /var/home/ftp*" ++CHECKSECURITY_PATHFILTER="-false" ++#### ++# ++# Location of setuid file databases. Probably should ++# be in /var/lib/cron, but I don't want to move them now. After ++# the release, maybe. ++# ++LOGDIR=/var/log +--- cron-3.0pl1.orig/debian/conffiles.nopam ++++ cron-3.0pl1/debian/conffiles.nopam +@@ -0,0 +1,5 @@ ++/etc/checksecurity.conf ++/etc/crontab ++/etc/init.d/cron ++/etc/cron.daily/standard ++/etc/cron.monthly/standard +--- cron-3.0pl1.orig/debian/conffiles.pam ++++ cron-3.0pl1/debian/conffiles.pam +@@ -0,0 +1,6 @@ ++/etc/checksecurity.conf ++/etc/crontab ++/etc/init.d/cron ++/etc/cron.daily/standard ++/etc/cron.monthly/standard ++/etc/pam.d/cron +--- cron-3.0pl1.orig/debian/control ++++ cron-3.0pl1/debian/control +@@ -0,0 +1,35 @@ ++Source: cron ++Section: admin ++Priority: important ++Maintainer: Steve Greenland ++Standards-Version: 3.5.2 ++Build-Depends: debhelper, libpam0g-dev ++ ++Package: cron ++Architecture: any ++Depends: ${shlibs:Depends}, debianutils (>=1.7) ++Recommends: exim | smail | sendmail | mail-transport-agent ++Suggests: anacron (>=2.0-1), logrotate, lockfile-progs ++Conflicts: suidmanager (<< 0.50) ++Provides: ++Description: management of regular background processing ++ cron is a background process (`daemon') that runs programs at regular ++ intervals (for example, every minute, day, week or month); which ++ processes are run and at what times are specified in the `crontab'. ++ . ++ Users may also install crontabs so that processes are run on ++ their behalf, though this feature can be disabled or restricted to ++ particular users. ++ . ++ Output from the commands is usually mailed to the system administrator ++ (or to the user in question); you should probably install a mail system ++ as well so that you can receive these messages. ++ . ++ This cron package is configured by default to do various standard ++ system maintenance tasks, such as ensuring that logfiles do not ++ grow endlessly and overflow the disk. ++ . ++ The lockfile-progs package is only a "Suggests" because of the poor ++ way that dselect handles "Recomments", but I do strongly suggest that ++ you install it; it prevents /etc/cron.daily/standard from running multiple ++ times if something gets jammed. +--- cron-3.0pl1.orig/debian/copyright ++++ cron-3.0pl1/debian/copyright +@@ -0,0 +1,39 @@ ++Copyright 1988,1990,1993,1994 by Paul Vixie; ++All rights reserved ++ ++Distribute freely, except: don't remove my name from the source or ++documentation (don't take credit for my work), mark your changes (don't ++get me blamed for your possible bugs), don't alter or remove this ++notice. May be sold if buildable source is provided to buyer. No ++warranty of any kind, express or implied, is included with this ++software; use at your own risk, responsibility for damages (if any) to ++anyone resulting from the use of this software rests entirely with the ++user. ++ ++ ++The original source for this package may be obtained from ++ftp://ftp.vix.com/pub/vixie/cron-3.0. ++ ++Modifications for Debian GNU/Linux Copyright 1994 Ian Jackson; ++checksecurity script: ++Copyright (C) 1994 Ian Jackson ++Copyright (C) 1996, 1997, 1998, 1999, 2000 Steve Greenland ++ ++The `checksecurity' script and its associated files (checksecurity.8 ++and checksecurity.conf) are 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. ++ ++A copy of the GNU General Public License is available as ++`/usr/share/common-licenses/GPL' in the ++Debian GNU/Linux distribution or on the World Wide Web ++at `http://www.gnu.org/copyleft/gpl.html'. You can also obtain it by ++writing to the Free Software Foundation, Inc., 59 Temple Place - Suite ++330, Boston, MA 02111-1307, USA. ++ +--- cron-3.0pl1.orig/debian/cron.init ++++ cron-3.0pl1/debian/cron.init +@@ -0,0 +1,28 @@ ++#!/bin/sh ++# Start/stop the cron daemon. ++ ++test -f /usr/sbin/cron || exit 0 ++ ++case "$1" in ++start) echo -n "Starting periodic command scheduler: cron" ++ start-stop-daemon --start --quiet --exec /usr/sbin/cron ++ echo "." ++ ;; ++stop) echo -n "Stopping periodic command scheduler: cron" ++ start-stop-daemon --stop --quiet --exec /usr/sbin/cron ++ echo "." ++ ;; ++restart) echo -n "Restarting periodic command scheduler: cron" ++ start-stop-daemon --stop --quiet --exec /usr/sbin/cron ++ start-stop-daemon --start --quiet --exec /usr/sbin/cron ++ echo "." ++ ;; ++reload|force-reload) echo -n "Reloading configuration files for periodic command scheduler: cron" ++ # cron reloads automatically ++ echo "." ++ ;; ++*) echo "Usage: /etc/init.d/cron start|stop|restart|reload|force-reload" ++ exit 1 ++ ;; ++esac ++exit 0 +--- cron-3.0pl1.orig/debian/cron.pam ++++ cron-3.0pl1/debian/cron.pam +@@ -0,0 +1,9 @@ ++# ++# The PAM configuration file for the cron daemon ++# ++ ++account required pam_unix.so ++auth required pam_unix.so nullok ++auth required pam_env.so ++session required pam_unix.so ++ +--- cron-3.0pl1.orig/debian/crontab.main ++++ cron-3.0pl1/debian/crontab.main +@@ -0,0 +1,15 @@ ++# /etc/crontab: system-wide crontab ++# Unlike any other crontab you don't have to run the `crontab' ++# command to install the new version when you edit this file. ++# This file also has a username field, that none of the other crontabs do. ++ ++SHELL=/bin/sh ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ++ ++# m h dom mon dow user command ++25 6 * * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily ++47 6 * * 7 root test -e /usr/sbin/anacron || run-parts --report /etc/cron.weekly ++52 6 1 * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.monthly ++# ++ ++ +--- cron-3.0pl1.orig/debian/dirs ++++ cron-3.0pl1/debian/dirs +@@ -0,0 +1,12 @@ ++usr/bin ++usr/sbin ++usr/share/man/man1 ++usr/share/man/man5 ++usr/share/man/man8 ++etc/cron.daily ++etc/cron.weekly ++etc/cron.monthly ++etc/cron.d ++etc/init.d ++etc/pam.d ++var/spool/cron/crontabs +--- cron-3.0pl1.orig/debian/postinst ++++ cron-3.0pl1/debian/postinst +@@ -0,0 +1,51 @@ ++#!/bin/sh ++set -e ++ ++update-rc.d cron defaults 89 11 >/dev/null ++# Copy existing allow/deny files ++crondir="/var/spool/cron" ++pausemessage="F" ++for fname in allow deny ; do ++ if [ -f $crondir/$fname ] ; then ++ if [ ! -f $/etc/cron.$fname ] ; then ++ mv $crondir/$fname /etc/cron.$fname ++ echo " " ++ echo "Moving $crondir/$fname to /etc/cron.$fname to comply with Debian policy" ++ pausemessage="T" ++ else ++ echo " " ++ echo "Warning:" ++ echo "Both $crondir/$fname and /etc/cron.$fname exist -- cron will" ++ echo "use /etc/cron.$fname" ++ pausemessage="T" ++ fi ++ fi ++done ++# ++# Check for upgrades from very old versions ++# ++if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt "3.0pl1-43" ; then ++ echo " " ++ echo "The format of the setuid.today file (output from checksecurity) has" ++ echo "changed. This means that the first run of checksecurity after the " ++ echo "upgrade will produce a diff on every every file affected". ++ pausemessage="T" ++fi ++ ++# ++# Move dpkg status file backups, if necessary/possible. ++# ++( cd /var/lib/dpkg ; ++for oldstat in status.yesterday.* ; do ++ if [ -f $oldstat ] ; then ++ newstat=`echo $oldstat | sed 's/yesterday\.//'`; ++ newstat=/var/backups/dpkg.$newstat; ++ if [ ! -f $newstat ] ; then ++ mv $oldstat $newstat ; ++ fi ++ fi ++done) ++ ++start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/cron ++ ++#DEBHELPER# +--- cron-3.0pl1.orig/debian/postrm ++++ cron-3.0pl1/debian/postrm +@@ -0,0 +1,7 @@ ++#!/bin/sh ++set -e ++if [ $1 = purge ]; then ++ update-rc.d cron remove >/dev/null ++ rm -f /etc/cron.allow /etc/cron.deny ++fi ++ +--- cron-3.0pl1.orig/debian/preinst ++++ cron-3.0pl1/debian/preinst +@@ -0,0 +1,8 @@ ++#! /bin/sh ++# ++# Needed because -36 and -36.1 included bad prerm scripts ++# ++if [ "$1" = "upgrade" -a \( "$2" = "3.0pl1-36" -o "$2" = "3.0pl1-36.1" \) ] ; then ++ #kill the running cron ++ start-stop-daemon --oknodo --quiet --stop --exec /usr/sbin/cron ++fi +--- cron-3.0pl1.orig/debian/prerm ++++ cron-3.0pl1/debian/prerm +@@ -0,0 +1,5 @@ ++#!/bin/sh ++set -e ++/etc/init.d/cron stop ++ ++#DEBHELPER# +--- cron-3.0pl1.orig/debian/rules ++++ cron-3.0pl1/debian/rules +@@ -0,0 +1,106 @@ ++#!/usr/bin/make -f ++# ++# Rules file for cron ++# ++ ++# Uncomment this to turn on verbose mode. ++#export DH_VERBOSE=1 ++ ++DEB_OPTIM= -O2 -Wall ++DEB_INSTALL = install ++DEB_DEBUG_DEFS = -DDEBUGGING=0 ++ ++ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) ++ DEB_OPTIM = -g -Wall ++ DEB_DEBUG_DEFS= -DDEBUGGING=1 ++endif ++ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) ++ DEB_INSTALL += -s ++endif ++ ++# Set system type (Linux, HURD, etc.) ++DEB_HOST_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) ++ifeq ($(DEB_HOST_GNU_SYSTEM), gnu) ++ PAM_DEFS = ++ PAM_LIBS = ++ CONFFILES = conffiles.nopam ++else ++ PAM_DEFS = -DUSE_PAM ++ PAM_LIBS = -lpam ++ CONFFILES = conffiles.pam ++endif ++ ++export PAM_DEFS ++export PAM_LIBS ++ ++build: build-stamp ++build-stamp: ++ dh_testdir ++ ++ # Add here commands to compile the package. ++ $(MAKE) OPTIM="$(DEB_OPTIM)" DEBUG_DEFS="$(DEB_DEBUG_DEFS)" ++ ++ touch build-stamp ++ ++clean: ++ dh_testdir ++ dh_testroot ++ rm -f build-stamp ++ ++ # Add here commands to clean up after the build process. ++ -$(MAKE) clean ++ rm -f debian/conffiles ++ dh_clean ++ ++# Build architecture-independent files here. ++binary-indep: build ++# We have nothing to do by default. ++ ++# Build architecture-dependent files here. ++binary-arch: build ++# dh_testversion ++ dh_testdir ++ dh_testroot ++ dh_clean -k ++ dh_installdirs ++ ++ # Add here commands to install the files into debian/tmp ++ $(MAKE) install DESTDIR=`pwd`/debian/tmp OPTIM="$(DEB_OPTIM)" INSTALL="$(DEB_INSTALL)" DEBUG_DEFS="$(DEB_DEBUG_DEFS)" ++ install -m 755 debian/checksecurity debian/tmp/usr/sbin/. ++ install -m 644 debian/checksecurity.conf debian/tmp/etc/. ++ ++ cp -p debian/$(CONFFILES) debian/conffiles ++ dh_installdocs FEATURES THANKS README debian/README.anacron ++# dh_installexamples ++# dh_installmenu ++ dh_installpam ++ dh_installinit --noscripts ++ # Can't use dh_installcron because we don't have "normal" naming ++ # convention ++ install -m 644 debian/crontab.main debian/tmp/etc/crontab ++ install -m 755 debian/standard.daily \ ++ debian/tmp/etc/cron.daily/standard ++ install -m 755 debian/standard.monthly \ ++ debian/tmp/etc/cron.monthly/standard ++ dh_installmanpages crontab.1 crontab.5 cron.8 bitstring.3 ++# dh_undocumented ++ dh_installchangelogs CHANGES ++ dh_strip ++ dh_compress ++ dh_fixperms ++ # dh_suidregister -- deliberately commented out, as it causes ++ # /usr/bin/crontab to be shipped non-suid. ++ # so does dh_fixperms when not run under fakeroot. sigh. ++ chmod u+s debian/tmp/usr/bin/crontab ++ dh_installdeb ++ dh_shlibdeps ++ dh_gencontrol ++# dh_makeshlibs ++ dh_md5sums ++ dh_builddeb ++ ++source diff: ++ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false ++ ++binary: binary-indep binary-arch ++.PHONY: build clean binary-indep binary-arch binary +--- cron-3.0pl1.orig/debian/standard.daily ++++ cron-3.0pl1/debian/standard.daily +@@ -0,0 +1,103 @@ ++#!/bin/sh ++# /etc/cron.daily/standard: standard daily maintenance script ++# Written by Ian A. Murdock ++# Modified by Ian Jackson ++# Modified by Steve Greenland ++ ++bak=/var/backups ++LOCKFILE=/var/lock/cron.daily ++umask 022 ++ ++# ++# Avoid running more than one at a time -- could happen if the ++# checksecurity script lands on a network drive. ++# ++ ++if [ -x /usr/bin/lockfile-create ] ; then ++ lockfile-create $LOCKFILE ++ if [ $? -ne 0 ] ; then ++ cat </dev/null ++ fi ++fi ++cd /var/log ++umask 027 ++savelog -c 7 -m 640 -u root -g adm setuid.changes >/dev/null ++checksecurity >setuid.changes ++ ++# ++# Check to see if any files are in lost+found directories and warn admin ++# ++# Get a list of the (potential) ext2 l+f directories ++lflist=`df -P --type=ext2 |awk '$6 == "/" {$6 = ""} /\/dev\// {printf "%s/lost+found ", $6}'` ++ ++# In each directory, look for files ++for lfdir in $lflist ; do ++ if [ -d "$lfdir" ] ; then ++ more_lost_found=`ls -1 "$lfdir" | grep -v 'lost+found$' | sed 's/^/ /'` ++ if [ -n "$more_lost_found" ] ; then ++ lost_found="$lost_found ++ ++$lfdir: ++$more_lost_found" ++ # NOTE: above weird line breaks in string are intentional! ++ fi ++ fi ++done ++ ++if [ -n "$lost_found" ]; then ++ cat << EOF ++Files were found in lost+found directories. This is probably ++the result of a crash or bad shutdown, or possibly of a disk ++problem. These files may contain important information. You ++should examine them, and move them out of lost+found or delete ++them if they are not important. ++ ++The following files were found: ++$lost_found ++EOF ++fi ++ ++# ++# Clean up lockfile ++# ++if [ -x /usr/bin/lockfile-create ] ; then ++ kill $LOCKTOUCHPID ++ lockfile-remove $LOCKFILE ++fi +--- cron-3.0pl1.orig/debian/standard.monthly ++++ cron-3.0pl1/debian/standard.monthly +@@ -0,0 +1,4 @@ ++#!/bin/sh ++# /etc/cron.monthly/standard: standard monthly maintenance script ++ ++# rotation of wtmp and btmp taken over by logrotate diff --git a/packages/hackbard/cups/cups b/packages/hackbard/cups/cups new file mode 100644 index 0000000..6fec009 --- /dev/null +++ b/packages/hackbard/cups/cups @@ -0,0 +1,10 @@ +# hdw - linux cups package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.1.20 +# [S] 3-8 +# [D] cups-1.1.20-source.tar.bz2 ftp://ftp2.easysw.com/pub/cups/1.1.20/ + +confopt="$confopt --disable-ssl --with-logdir=$root/var/cups/log" +confopt="$confopt --with-cups-user=daemon --with-cups-group=daemon" diff --git a/packages/hackbard/cups/cups.init b/packages/hackbard/cups/cups.init new file mode 100644 index 0000000..4341c67 --- /dev/null +++ b/packages/hackbard/cups/cups.init @@ -0,0 +1,3 @@ +s_value=50 +bin=cupsd +run=cupsd diff --git a/packages/hackbard/cups/manpages.patch b/packages/hackbard/cups/manpages.patch new file mode 100644 index 0000000..da7d424 --- /dev/null +++ b/packages/hackbard/cups/manpages.patch @@ -0,0 +1,11 @@ +--- ./man/Makefile.orig 2003-10-30 13:36:13.000000000 +0100 ++++ ./man/Makefile 2003-10-30 13:36:26.000000000 +0100 +@@ -30,7 +30,7 @@ + # Other languages... + # + +-LANGDIRS = fr ++#LANGDIRS = fr + + + # diff --git a/packages/hackbard/curl/curl b/packages/hackbard/curl/curl new file mode 100644 index 0000000..3511036 --- /dev/null +++ b/packages/hackbard/curl/curl @@ -0,0 +1,7 @@ +# hdw - linux curl package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 7.12.0 +# [S] 3-1 +# [D] curl-7.12.0.tar.bz2 http://curl.haxx.se/download/ diff --git a/packages/hackbard/cvsd/cvsd b/packages/hackbard/cvsd/cvsd new file mode 100644 index 0000000..3920afb --- /dev/null +++ b/packages/hackbard/cvsd/cvsd @@ -0,0 +1,15 @@ +# hdw - linux cvsd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.2 +# [S] 3-2 +# [D] cvsd-1.0.2.tar.gz http://tiefighter.et.tudelft.nl/~arthur/cvsd/ + +post_install() { + echo "installing docs ..." + mkdir -p $docdir + cp README $docdir + # we create our own cvsd init script + rm $root/etc/init.d/cvsd + } diff --git a/packages/hackbard/cvsd/cvsd.init b/packages/hackbard/cvsd/cvsd.init new file mode 100644 index 0000000..15d0f13 --- /dev/null +++ b/packages/hackbard/cvsd/cvsd.init @@ -0,0 +1 @@ +s_value=80 diff --git a/packages/hackbard/cvsd/cvsd.setup b/packages/hackbard/cvsd/cvsd.setup new file mode 100644 index 0000000..98af032 --- /dev/null +++ b/packages/hackbard/cvsd/cvsd.setup @@ -0,0 +1,12 @@ +setup_block() { + groupadd -g 1050 cvsd || true + useradd -c 'cvsd pserver' -g cvsd -s /bin/false -u 1050 cvsd || true + echo "added cvsd user and group" + [ -d /etc/cvsd ] && chown -R cvsd.cvsd /etc/cvsd + } + +uninstall_block() { + groupdel cvsd || true + userdel cvsd || true + echo "removed cvsd user and group" + } diff --git a/packages/hackbard/dfbpoint/dfbpoint b/packages/hackbard/dfbpoint/dfbpoint new file mode 100644 index 0000000..3d850c2 --- /dev/null +++ b/packages/hackbard/dfbpoint/dfbpoint @@ -0,0 +1,9 @@ +# hdw - linux dfbpoint package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.7.2 +# [S] 3-6 +# [D] DFBPoint-0.7.2.tar.gz http://www.directfb.org/download/DFBPoint/ + +srcdir="DFBPoint-$ver" diff --git a/packages/hackbard/dfbpoint/render_c.patch b/packages/hackbard/dfbpoint/render_c.patch new file mode 100644 index 0000000..e32e6d3 --- /dev/null +++ b/packages/hackbard/dfbpoint/render_c.patch @@ -0,0 +1,11 @@ +--- ./src/render.c.orig 2003-03-22 09:26:56.000000000 +0100 ++++ ./src/render.c 2003-03-22 09:27:39.000000000 +0100 +@@ -176,6 +176,8 @@ + size = (size * 64) / 52; + else if (IS_LISTITEM (text)) + size = (size * 48) / 64; ++ else ++ offx+=40; + + font = resources_get_font (face, size); + diff --git a/packages/hackbard/dfbsee/dfbsee b/packages/hackbard/dfbsee/dfbsee new file mode 100644 index 0000000..fe0d8d8 --- /dev/null +++ b/packages/hackbard/dfbsee/dfbsee @@ -0,0 +1,9 @@ +# hdw - linux dfbsee package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.7.4 +# [S] 3-6 +# [D] DFBSee-0.7.4.tar.gz http://www.directfb.org/download/DFBSee/ + +srcdir="DFBSee-$ver" diff --git a/packages/hackbard/directfb/directfb b/packages/hackbard/directfb/directfb new file mode 100644 index 0000000..890f76a --- /dev/null +++ b/packages/hackbard/directfb/directfb @@ -0,0 +1,27 @@ +# hdw - linux directfb package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-5 +# [D] directfb.tar.bz2 cvs:anonymous:directfb.org:cvs/directfb:DirectFB + +srcdir="DirectFB-$ver" +[ "$ver" = "cvs" ] && srcdir="DirectFB" + +confopt="$confopt --enable-sysfs" +# uncomment if you want multi app support (requires fusion kernel patch) +# confopt="$confopt --enable-multi" + +if [ "$ver" = "cvs" ]; then + pre_install() { + ./autogen.sh $confopt + } +fi + +post_install() { + # fb.modes + [ -f $root/etc/fb.modes ] && mv $root/etc/fb.modes $root/etc/fb.modes~ + mv -v fb.modes $root/etc + chown root.root $root/etc/fb.modes + } diff --git a/packages/hackbard/elftoaout/elftoaout b/packages/hackbard/elftoaout/elftoaout new file mode 100644 index 0000000..bc80173 --- /dev/null +++ b/packages/hackbard/elftoaout/elftoaout @@ -0,0 +1,13 @@ +# hdw - linux elftoaout package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.2 +# [S] 3-3 +# [D] elftoaout-2.2.tar.gz http://www.hackdaworld.dyndns.org/download/hdw-linux/hdw-linux-0.3/sources/hackbard/elftoaout/ + +build_main() { + make && + mv ./elftoaout $prefix/bin + mv ./elftoaout.1 $prefix/man/man1 + } diff --git a/packages/hackbard/fbset/fbset b/packages/hackbard/fbset/fbset new file mode 100644 index 0000000..03d6355 --- /dev/null +++ b/packages/hackbard/fbset/fbset @@ -0,0 +1,11 @@ +# hdw - linux fbset package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.1 +# [S] 3-1 +# [D] fbset-2.1.tar.gz http://home.tvd.be/cr26864/Linux/fbdev/ + +post_install() { + echo "# man 5 fb.modes" > $root/etc/fb.modes + } diff --git a/packages/hackbard/fbset/makefile.patch b/packages/hackbard/fbset/makefile.patch new file mode 100644 index 0000000..8eaf87e --- /dev/null +++ b/packages/hackbard/fbset/makefile.patch @@ -0,0 +1,18 @@ +--- old/Makefile.orig Fri Aug 23 16:21:49 2002 ++++ new/Makefile Fri Aug 23 16:27:34 2002 +@@ -28,14 +28,7 @@ + $(INSTALL) fbset /usr/sbin + $(INSTALL) fbset.8 /usr/man/man8 + $(INSTALL) fb.modes.5 /usr/man/man5 +- if [ ! -c /dev/fb0 ]; then mknod /dev/fb0 c 29 0; fi +- if [ ! -c /dev/fb1 ]; then mknod /dev/fb1 c 29 32; fi +- if [ ! -c /dev/fb2 ]; then mknod /dev/fb2 c 29 64; fi +- if [ ! -c /dev/fb3 ]; then mknod /dev/fb3 c 29 96; fi +- if [ ! -c /dev/fb4 ]; then mknod /dev/fb4 c 29 128; fi +- if [ ! -c /dev/fb5 ]; then mknod /dev/fb5 c 29 160; fi +- if [ ! -c /dev/fb6 ]; then mknod /dev/fb6 c 29 192; fi +- if [ ! -c /dev/fb7 ]; then mknod /dev/fb7 c 29 224; fi ++ $(INSTALL) modeline2fb /usr/sbin + + clean: + $(RM) *.o fbset lex.yy.c modes.tab.c modes.tab.h diff --git a/packages/hackbard/gpsd/gpsd b/packages/hackbard/gpsd/gpsd new file mode 100644 index 0000000..3cefb37 --- /dev/null +++ b/packages/hackbard/gpsd/gpsd @@ -0,0 +1,13 @@ +# hdw - linux gpsd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.10 +# [S] 3-9 +# [D] gpsd-1.10.tar.gz http://pygps.org/gpsd/downloads/ + +build_main() { + ./configure && make && + cp -v gpsd $prefix/bin && # gps follows, needs motif + mkdir -p $prefix/lib && cp -v libgpsd.a $prefix/lib + } diff --git a/packages/hackbard/gpsd/include_stdarg_h.patch b/packages/hackbard/gpsd/include_stdarg_h.patch new file mode 100644 index 0000000..7af14ff --- /dev/null +++ b/packages/hackbard/gpsd/include_stdarg_h.patch @@ -0,0 +1,11 @@ +--- ./netlib.c.orig 2003-10-31 01:32:22.000000000 +0100 ++++ ./netlib.c 2003-10-31 01:32:37.000000000 +0100 +@@ -9,7 +9,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include diff --git a/packages/hackbard/gtk-gnutella/configure.patch b/packages/hackbard/gtk-gnutella/configure.patch new file mode 100644 index 0000000..646f75a --- /dev/null +++ b/packages/hackbard/gtk-gnutella/configure.patch @@ -0,0 +1,18 @@ +--- ./Configure.orig 2004-07-19 23:37:17.000000000 +0200 ++++ ./Configure 2004-07-19 23:38:04.000000000 +0200 +@@ -698,15 +698,6 @@ + esac + + : Sanity checks +-case "$fastread$alldone" in +-yescont|yesexit) ;; +-*) +- if test ! -t 0; then +- echo "Say 'sh Configure', not 'sh &1 + case "$silent" in diff --git a/packages/hackbard/gtk-gnutella/gtk-gnutella b/packages/hackbard/gtk-gnutella/gtk-gnutella new file mode 100644 index 0000000..16ad460 --- /dev/null +++ b/packages/hackbard/gtk-gnutella/gtk-gnutella @@ -0,0 +1,16 @@ +# hdw - linux gtk-gnutella package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.93.4 +# [S] 3-8 +# [D] gtk-gnutella-0.93.4.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/gtk-gnutella/ + +confopt="-d -D prefix=/usr" +install_conf="INSTALL_PREFIX=$root $install_conf" + +build_main() { + ./Configure $confopt + make $make_conf + make install $install_conf + } diff --git a/packages/hackbard/hdparm/hdparm b/packages/hackbard/hdparm/hdparm new file mode 100644 index 0000000..f413607 --- /dev/null +++ b/packages/hackbard/hdparm/hdparm @@ -0,0 +1,7 @@ +# hdw - linux hdparm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 5.5 +# [S] 3-1 +# [D] hdparm-5.5.tar.gz http://www.ibiblio.org/pub/Linux/system/hardware/ diff --git a/packages/hackbard/hdparm/readahead.patch b/packages/hackbard/hdparm/readahead.patch new file mode 100644 index 0000000..9158a3f --- /dev/null +++ b/packages/hackbard/hdparm/readahead.patch @@ -0,0 +1,31 @@ +--- ./hdparm.c.orig 2004-07-14 14:31:02.000000000 +0200 ++++ ./hdparm.c 2004-07-14 14:37:11.000000000 +0200 +@@ -52,7 +52,7 @@ + static int flagcount = 0, do_flush = 0, is_scsi_hd = 0, is_scsi_cd = 0, is_xt_hd = 0; + static int do_ctimings, do_timings = 0; + +-static unsigned long set_readahead= 0, get_readahead= 0, readahead= 0; ++static unsigned long set_readahead= 0, get_readahead= 0, my_readahead= 0; + static unsigned long set_readonly = 0, get_readonly = 0, readonly = 0; + static unsigned long set_unmask = 0, get_unmask = 0, unmask = 0; + static unsigned long set_mult = 0, get_mult = 0, mult = 0; +@@ -784,8 +784,8 @@ + + if (set_readahead) { + if (get_readahead) +- printf(" setting fs readahead to %ld\n", readahead); +- if (ioctl(fd, BLKRASET, readahead)) ++ printf(" setting fs readahead to %ld\n", my_readahead); ++ if (ioctl(fd, BLKRASET, my_readahead)) + perror(" BLKRASET failed"); + } + #ifdef HDIO_UNREGISTER_HWIF +@@ -1829,7 +1829,7 @@ + case 'a': + get_readahead = noisy; + noisy = 1; +- GET_NUMBER(set_readahead,readahead); ++ GET_NUMBER(set_readahead,my_readahead); + break; + case 'B': + get_apmmode = noisy; diff --git a/packages/hackbard/hostap/hostap b/packages/hackbard/hostap/hostap new file mode 100644 index 0000000..a07b83e --- /dev/null +++ b/packages/hackbard/hostap/hostap @@ -0,0 +1,14 @@ +# hdw - linux hostap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.1.3 +# [S] 3-2 +# [D] hostap-driver-0.1.3.tar.gz http://hostap.epitest.fi/releases/ +## [D] hostap-utils-0.1.3.tar.gz http://hostap.epitest.fi/releases/ +## [D] hostapd-0.1.3.tar.gz http://hostap.epitest.fi/releases/ + +post_install() { + rm -rf $docdir ; mkdir -p $docdir + cp README $docdir +} diff --git a/packages/hackbard/ipcheck/ipcheck b/packages/hackbard/ipcheck/ipcheck new file mode 100644 index 0000000..060a977 --- /dev/null +++ b/packages/hackbard/ipcheck/ipcheck @@ -0,0 +1,14 @@ +# hdw - linux ipcheck package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0 +# [S] 3-1 +# [D] ipcheck.py http://ipcheck.sourceforge.net/ + +custmain="1" +custmain() { + mkdir -p $prefix/bin + cp $archdir/ipcheck.py $prefix/bin + chmod 700 $prefix/bin/ipcheck.py + } diff --git a/packages/hackbard/irssi/irssi b/packages/hackbard/irssi/irssi new file mode 100644 index 0000000..e104aa8 --- /dev/null +++ b/packages/hackbard/irssi/irssi @@ -0,0 +1,7 @@ +# hdw - linux irssi package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.8.9 +# [S] 3-7 +# [D] irssi-0.8.9.tar.bz2 http://irssi.org/files/ diff --git a/packages/hackbard/isdn4k-utils/autoconf.patch b/packages/hackbard/isdn4k-utils/autoconf.patch new file mode 100644 index 0000000..4b0da2b --- /dev/null +++ b/packages/hackbard/isdn4k-utils/autoconf.patch @@ -0,0 +1,135 @@ +--- ./capi20/Makefile.in.org Sat Jul 6 02:26:12 2002 ++++ ./capi20/Makefile.in Mon Jan 20 18:36:24 2003 +@@ -125,7 +125,7 @@ + .SUFFIXES: + .SUFFIXES: .S .c .lo .o .s + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -a --foreign Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ +--- ./capiinfo/configure Fri Jul 19 23:19:41 2002 ++++ ./capiinfo/configure Mon Jan 20 18:55:57 2003 +@@ -1194,7 +1194,7 @@ + + + +-am__api_version="1.6" ++am__api_version="1.8" + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then +--- ./capiinit/Makefile.in.org Mon Jan 20 19:01:19 2003 ++++ ./capiinit/Makefile.in Mon Jan 20 19:15:09 2003 +@@ -111,7 +111,7 @@ + .SUFFIXES: + .SUFFIXES: .S .c .o .s + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -i -a --foreign Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ +--- ./rcapid/configure.org Fri Jul 19 23:58:45 2002 ++++ ./rcapid/configure Mon Jan 20 20:36:59 2003 +@@ -1194,7 +1194,7 @@ + + + +-am__api_version="1.6" ++am__api_version="1.8" + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then +--- ./capiinfo/Makefile.in.orig 2002-07-19 23:20:34.000000000 +0200 ++++ ./capiinfo/Makefile.in 2002-10-14 11:03:32.000000000 +0200 +@@ -121,7 +121,7 @@ + .SUFFIXES: + .SUFFIXES: .S .c .o .s + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -i --foreign Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ +@@ -318,7 +318,7 @@ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ +- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile ++ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir -i --foreign Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +--- ./xmonisdn/Makefile.in.orig 2002-07-19 22:30:02.000000000 +0200 ++++ ./xmonisdn/Makefile.in 2002-10-14 11:03:32.000000000 +0200 +@@ -65,6 +65,8 @@ + config: + @cp Makefile.in GNUmakefile + @xmkmf ++ @echo "Hacking the Makefile .. (Clifford)" ++ @perl -pe 's,^(xmonisdn:.*),$$1\n\t\$$(MAKE) xmonisdn.man,' < Makefile > x && mv x Makefile + + clean: + $(MAKE) -f Makefile clean +--- ./capifax/Makefile.in.orig 2000-05-11 12:55:00.000000000 +0200 ++++ ./capifax/Makefile.in 2002-10-14 11:03:32.000000000 +0200 +@@ -124,7 +124,7 @@ + .SUFFIXES: + .SUFFIXES: .S .c .o .s + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -i --foreign Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ +@@ -286,7 +286,7 @@ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ +- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile ++ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir -i --foreign Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ +--- ./vbox/doc/Makefile.in.orig 2003-09-16 19:08:03.000000000 +0200 ++++ ./vbox/doc/Makefile.in 2003-09-16 19:13:57.000000000 +0200 +@@ -111,7 +111,7 @@ + all: all-redirect + .SUFFIXES: + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -i -a --foreign doc/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ +--- ./vbox/doc/de/Makefile.in.orig 2003-09-16 19:39:53.000000000 +0200 ++++ ./vbox/doc/de/Makefile.in 2003-09-16 19:40:15.000000000 +0200 +@@ -108,7 +108,7 @@ + + .SUFFIXES: + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/de/Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -i -a --foreign doc/de/Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ +--- ./rcapid/Makefile.in.orig 2003-09-16 20:15:46.000000000 +0200 ++++ ./rcapid/Makefile.in 2003-09-16 20:16:41.000000000 +0200 +@@ -111,13 +111,13 @@ + .SUFFIXES: + .SUFFIXES: .S .c .o .s + $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile ++ cd $(top_srcdir) && $(AUTOMAKE) -i -a --foreign Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +-$(ACLOCAL_M4): configure.in acinclude.m4 ++$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + + config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) diff --git a/packages/hackbard/isdn4k-utils/isdn4k-utils b/packages/hackbard/isdn4k-utils/isdn4k-utils new file mode 100644 index 0000000..616c24b --- /dev/null +++ b/packages/hackbard/isdn4k-utils/isdn4k-utils @@ -0,0 +1,23 @@ +# hdw - linux isdn4k-utils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] v3.2p1 +# [S] 3-7 +# [D] isdn4k-utils.v3.2p1.tar.bz2 ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/ + +build_main() { + [ -z "`echo $PATH | grep X11\/bin`" ] && \ + export PATH="$PATH:$root/usr/X11/bin" + cd capi20 && + libtoolize -f -c && + cd .. + if [ ! -f $root/var/adm/flists/xfree86 ] ; then + make_conf="$make_conf CONFIG_XISDNLOAD=n CONFIG_XMONISDN=n" + fi + # prepare config + cp .config.rpm .config + make $make_conf subconfig && + make $make_conf && + make $make_conf install + } diff --git a/packages/hackbard/isdn4k-utils/no_make_dev.patch b/packages/hackbard/isdn4k-utils/no_make_dev.patch new file mode 100644 index 0000000..8d16155 --- /dev/null +++ b/packages/hackbard/isdn4k-utils/no_make_dev.patch @@ -0,0 +1,11 @@ +--- ./Makefile.orig 2003-09-14 21:41:59.000000000 +0200 ++++ ./Makefile 2003-09-14 21:43:35.000000000 +0200 +@@ -135,8 +135,6 @@ + @if [ -c $(DESTDIR)/dev/isdnctrl0 ] && ls -l $(DESTDIR)/dev/isdnctrl0 | egrep "[[:space:]]45,[[:space:]]+64[[:space:]]" > /dev/null; \ + then \ + /bin/echo -e '(some) ISDN devices already exist, not creating them.\nUse scripts/makedev.sh manually if necessary.'; \ +- else \ +- sh scripts/makedev.sh $(DESTDIR) ; \ + fi + + uninstall: rootperm diff --git a/packages/hackbard/isdn4k-utils/options_c.patch b/packages/hackbard/isdn4k-utils/options_c.patch new file mode 100644 index 0000000..bcd6127 --- /dev/null +++ b/packages/hackbard/isdn4k-utils/options_c.patch @@ -0,0 +1,30 @@ +--- ./ipppd/options.c.orig 2003-10-28 18:49:00.000000000 +0100 ++++ ./ipppd/options.c 2003-10-28 18:52:15.000000000 +0100 +@@ -479,26 +479,7 @@ + #define IMPLEMENTATION "" + #endif + +-static char *usage_string = "\ +-ipppd version %s patch level %d%s\n\ +-Usage: %s [ options ], where options are:\n\ +-\t Communicate over the named device\n\ +-#ifdef INCLUDE_OBSOLETE_FEATURES +-\tcrtscts Use hardware RTS/CTS flow control\n\ +-\t Set the baud rate to \n\ +-\tmodem Use modem control lines\n\ +-#endif +-\t: Set the local and/or remote interface IP\n\ +-\t\taddresses. (you also may use the option 'useifip' to get IPs).\n\ +-\tasyncmap Set the desired async map to hex \n\ +-\tauth Require authentication from peer\n\ +-\tconnect

Invoke shell command

to set up the serial line\n\ +-\tdefaultroute Add default route through interface\n\ +-\tfile Take options from file \n\ +-\tmru Set MRU value to for negotiation\n\ +-\tnetmask Set interface netmask to \n\ +-See ipppd(8) for more options.\n\ +-"; ++static char *usage_string = "\nipppd version %s patch level %d%s\n\nUsage: %s [ options ], where options are:\n\n\t Communicate over the named device\n\n\t: Set the local and/or remote interface IP\n\n\t\taddresses. (you also may use the option 'useifip' to get IPs).\n\n\tasyncmap Set the desired async map to hex \n\n\tauth Require authentication from peer\n\n\tconnect

Invoke shell command

to set up the serial line\n\n\tdefaultroute Add default route through interface\n\n\tfile Take options from file \n\n\tmru Set MRU value to for negotiation\n\n\tnetmask Set interface netmask to \n\nSee ipppd(8) for more options.\n"; + + static char *current_option; /* the name of the option being parsed */ + diff --git a/packages/hackbard/libunicode/libunicode b/packages/hackbard/libunicode/libunicode new file mode 100644 index 0000000..a6433c9 --- /dev/null +++ b/packages/hackbard/libunicode/libunicode @@ -0,0 +1,7 @@ +# hdw - linux libunicode package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.7 +# [S] 3-7 +# [D] libunicode-0.7.tar.gz http://belnet.dl.sourceforge.net/sourceforge/libunicode/ diff --git a/packages/hackbard/licq/licq b/packages/hackbard/licq/licq new file mode 100644 index 0000000..04827df --- /dev/null +++ b/packages/hackbard/licq/licq @@ -0,0 +1,14 @@ +# hdw - linux licq package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.7 +# [S] 3-8 +# [D] licq-1.2.7.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/licq/ + +post_install() { + cd plugins/qt-gui && + ./configure $confopt && + make $make_conf && make install $install_conf + } + diff --git a/packages/hackbard/licq/nptl.patch b/packages/hackbard/licq/nptl.patch new file mode 100644 index 0000000..4142017 --- /dev/null +++ b/packages/hackbard/licq/nptl.patch @@ -0,0 +1,12 @@ +--- ./src/sighandler.c.orig 2004-07-20 13:21:45.000000000 +0200 ++++ ./src/sighandler.c 2004-07-20 13:22:42.000000000 +0200 +@@ -83,7 +83,8 @@ + fprintf(stderr, "%s\n", res[0]);*/ + } + fprintf(stderr, "Attempting to generate core file.\n"); +- pthread_kill_other_threads_np(); ++ /* nptl glibc */ ++ /* pthread_kill_other_threads_np(); */ + #endif + + abort(); diff --git a/packages/hackbard/lphdisk/lphdisk b/packages/hackbard/lphdisk/lphdisk new file mode 100644 index 0000000..1ff3a78 --- /dev/null +++ b/packages/hackbard/lphdisk/lphdisk @@ -0,0 +1,13 @@ +# hdw - linux lphdisk package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.9.1 +# [S] 3-1 +# [D] lphdisk-0.9.1.tar.bz2 http://www.procyon.com/~pda/lphdisk/ + +pre_install() { + echo "patching makefile ..." + sed 's%/usr/local%/usr%g' Makefile > Makefile~ + mv Makefile~ Makefile + } diff --git a/packages/hackbard/lphdisk/usage.patch b/packages/hackbard/lphdisk/usage.patch new file mode 100644 index 0000000..96bb7a7 --- /dev/null +++ b/packages/hackbard/lphdisk/usage.patch @@ -0,0 +1,26 @@ +--- ./lphdisk.c.orig 2003-10-21 15:10:41.000000000 +0200 ++++ ./lphdisk.c 2003-10-21 15:14:13.000000000 +0200 +@@ -718,22 +718,7 @@ + {"force", 0, 0, 'f'}, + {0,0,0,0}}; + +-const char usage_string[] = "\ +-Usage: %1$s [options] [device] +-Prepare a hibernation partition for APM suspend-to-disk. +- +-options: +- -h, --help Display brief usage and option information (this screen) +- -p, --probeonly Only calculate and display required size, do not format +- -q, --quiet Turn off informational messages, useful for scripts +- -d, --debug Turn on (verbose) debugging messages +- -n, --nowrite Do not actually write to the disk +- -f, --force **DANGEROUS** Format without regard to potential problems +- +-'device' should be a raw disk device (not a partition). The default device +-is /dev/hda. +- +-(%2$s)\n\n"; ++const char usage_string[] = "Usage: %1$s [options] [device]\nPrepare a hibernation partition for APM suspend-to-disk.\n\n\noptions:\n -h, --help Display brief usage and option information (this screen)\n -p, --probeonly Only calculate and display required size, do not format\n -q, --quiet Turn off informational messages, useful for scripts\n -d, --debug Turn on (verbose) debugging messages\n -n, --nowrite Do not actually write to the disk\n -f, --force **DANGEROUS** Format without regard to potential problemsnn'device' should be a raw disk device (not a partition). The default devicenis /dev/hda.\n\n(%2$s)\n\n"; + + void print_usage (void) { + char *progname = rindex(argv0, '/'); diff --git a/packages/hackbard/lprng/lprng b/packages/hackbard/lprng/lprng new file mode 100644 index 0000000..af11d8a --- /dev/null +++ b/packages/hackbard/lprng/lprng @@ -0,0 +1,19 @@ +# hdw - linux lprng package +# +# author: hackbard@hackdaworld.dyndns.org +# +# +# [V] 3.8.27 +# [S] 3-9 +# [D] LPRng-3.8.27.tgz ftp://ftp.lprng.com/pub/LPRng/LPRng/ + +srcdir="LPRng-$ver" + +post_install() { + # documentation + rm -r $docdir ; mkdir -p $docdir + echo "copying documentation ..." + cp -r README TESTSUPPORT/ $docdir + # delete old init script + rm -rf $root/etc/rc.d + } diff --git a/packages/hackbard/lprng/lprng.init b/packages/hackbard/lprng/lprng.init new file mode 100644 index 0000000..11f42de --- /dev/null +++ b/packages/hackbard/lprng/lprng.init @@ -0,0 +1,3 @@ +run=lpd +bin=lpd +s_value=50 diff --git a/packages/hackbard/ltrace/ltrace b/packages/hackbard/ltrace/ltrace new file mode 100644 index 0000000..04b1fb9 --- /dev/null +++ b/packages/hackbard/ltrace/ltrace @@ -0,0 +1,9 @@ +# hdw - linux ltrace package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.3.34 +# [S] 3-1 +# [D] ltrace_0.3.34.tar.gz ftp://ftp.debian.org/debian/pool/main/l/ltrace/ + +confopt="--prefix=$root/usr" diff --git a/packages/hackbard/lynx/lynx b/packages/hackbard/lynx/lynx new file mode 100644 index 0000000..4b3e1d6 --- /dev/null +++ b/packages/hackbard/lynx/lynx @@ -0,0 +1,23 @@ +# HDW Linux lynx +# +# [M] Jonathan J. Vargas demian@hackdaworld.dyndns.org +# [I] Powerful console web browser. +# [V] 2.8.5 +# [S] 3-10 +# [D] lynx2.8.5.tar.bz2 http://lynx.isc.org/release/ + +flist_pruned="$flist_pruned|etc/conf/profile" + +confopt="$confopt --with-ssl" +post_install() +{ + make install-doc + make install-help + [ -f /etc/lynx.cfg ] || cp -v lynx.cfg /etc/ ; + + lynxcfg="[ -f /etc/lynx.cfg ] && export LYNX_CFG=/etc/lynx.cfg"; + + if ! grep "^$lynxcfg" /etc/conf/profile ; then + echo -e "\n$lynxcfg" >> /etc/conf/profile + fi +} diff --git a/packages/hackbard/magicfilter/magicfilter b/packages/hackbard/magicfilter/magicfilter new file mode 100644 index 0000000..9809103 --- /dev/null +++ b/packages/hackbard/magicfilter/magicfilter @@ -0,0 +1,14 @@ +# hdw - linux magicfilter package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.3.b +# [S] 3-9 +# [D] magicfilter-2.3.b.tar.gz http://www.pell.portland.or.us/~orc/Code/magicfilter/ + +confopt="--prefix=$prefix --confdir=$sysconfdir --with-lprng" +confopt="$confopt --filterdir=$prefix/share/magicfilter/filters" + +pre_install() { + ./configure.sh $confopt + } diff --git a/packages/hackbard/magicfilter/no_cfmagic.patch b/packages/hackbard/magicfilter/no_cfmagic.patch new file mode 100644 index 0000000..791faa3 --- /dev/null +++ b/packages/hackbard/magicfilter/no_cfmagic.patch @@ -0,0 +1,11 @@ +--- ./Makefile.in.orig 2003-10-31 19:58:18.000000000 +0100 ++++ ./Makefile.in 2003-10-31 19:58:54.000000000 +0100 +@@ -43,7 +43,7 @@ + cfmagic: file/magic + @MAKE_MAGIC@ magic + +-commoninstall: textonly cfmagic ++commoninstall: textonly + @INSTALL_DIR@ $(prefix)/@exedir@ + @INSTALL_DIR@ $(prefix)/@mandir@/man8 + @INSTALL_DIR@ $(prefix)/@mandir@/man5 diff --git a/packages/hackbard/mhonarc/makefile_pl.patch b/packages/hackbard/mhonarc/makefile_pl.patch new file mode 100644 index 0000000..7230781 --- /dev/null +++ b/packages/hackbard/mhonarc/makefile_pl.patch @@ -0,0 +1,15 @@ +--- ./Makefile.PL.orig 2003-09-19 22:55:27.000000000 +0200 ++++ ./Makefile.PL 2003-09-19 23:10:04.000000000 +0200 +@@ -44,9 +44,9 @@ + $perl = 'perl'; + } + ## Determine other commands that will be used +-my $chmod = $Config{'chmod'} || '/bin/chmod'; +-my $mkdir = $Config{'mkdir'} || '/bin/mkdir'; +-my $rm = $Config{'rm'} || '/bin/rm'; ++my $chmod = $Config{'chmod'} || '/usr/bin/chmod'; ++my $mkdir = $Config{'mkdir'} || '/usr/bin/mkdir'; ++my $rm = $Config{'rm'} || '/usr/bin/rm'; + + ## Print Makefile + print MAKEFILE < $sysconfdir/minimalist.config << EOF +# hdw - linux $sysconfdir/minimalist.config file +# +# author: hackbard@hackdaworld.dyndns.org +# +directory = $spooldir +admin = admin@foobar.org +password = change_this +errors to = admin +request valid = 12 +logfile = $logdir/minimalist.log +sendmail = /usr/sbin/sendmail +domain = |uname -n +security = paranoid +reply-to list = yes +# see $sysconfdir/minimalist.conf-sample +EOF + # read me for hdw users + cat > $docdir/readme_hdw_users << EOF +# hdw - linux minimalist readme file +# +# author: hackbard@hackdaworld.dyndns.org +# + +1. go to $sysconfdir and adjust/create minimalist.conf +2. edit /etc/mail/aliases (see aliases_sample file) and run newaliases +3. read the README file located in that directory +4. have a look at owner and modes of minimalist stuff for security reasons +5. have fun! ;) + +hackbard +EOF + # sample aliases file + cat > $docdir/aliases_sample << EOF +# hdw - linux aliases_sample file +# +# author: hackbard@hackdaworld.dyndns.org +# +minimalist: "|$bindir/minimalist.pl -d $sysconfdir" +hdw-linux: "|$bindir/minimalist.pl -d $sysconfdir hdw-linux" +hdw-linux-owner: admin +# and so on +EOF + } + diff --git a/packages/hackbard/mppp/mppp b/packages/hackbard/mppp/mppp new file mode 100644 index 0000000..31c9f86 --- /dev/null +++ b/packages/hackbard/mppp/mppp @@ -0,0 +1,19 @@ +# hdw - linux mppp package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.1b +# [S] 3-5 +# [D] mppp1.1b.tar.gz http://www.muquit.com/muquit/software/mppp/ + +build_main() { + # build + make clean + make -f Makefile.no-motif + cp -v mppp $root/usr/sbin/mppp + chmod 750 $root/usr/sbin/mppp + # config + mkdir -p $root/root/.mpppdir + cp -r ./dotmpppdir/* $root/root/.mpppdir + chmod 600 $root/root/.mpppdir/* + } diff --git a/packages/hackbard/openldap/openldap b/packages/hackbard/openldap/openldap new file mode 100644 index 0000000..90f2f99 --- /dev/null +++ b/packages/hackbard/openldap/openldap @@ -0,0 +1,10 @@ +# hdw - linux openldap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.2.14 +# [S] 3-3 +# [D] openldap-2.2.14.tgz ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ + +confop="$confopt --enable-wrappers --enable-shared" +make_conf="$make_conf depend all" diff --git a/packages/hackbard/parted/parted b/packages/hackbard/parted/parted new file mode 100644 index 0000000..1b7fbf5 --- /dev/null +++ b/packages/hackbard/parted/parted @@ -0,0 +1,9 @@ +# hdw - linux parted package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.6.11 +# [S] 3-1 +# [D] parted-1.6.11.tar.gz http://ftp.gnu.org/gnu/parted/ + +confopt="$confopt --without-readline" diff --git a/packages/hackbard/pciutils/pciutils b/packages/hackbard/pciutils/pciutils new file mode 100644 index 0000000..da44862 --- /dev/null +++ b/packages/hackbard/pciutils/pciutils @@ -0,0 +1,10 @@ +# hdw - linux pciutils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.1.11 +# [S] 3-1 +# [D] pciutils-2.1.11.tar.bz2 ftp://ftp.kernel.org/pub/software/utils/pciutils/ + +make_conf="PREFIX=$prefix $make_conf" +install_conf="$make_conf" diff --git a/packages/hackbard/pcmcia-cs/pcmcia-cs b/packages/hackbard/pcmcia-cs/pcmcia-cs new file mode 100644 index 0000000..7af08d5 --- /dev/null +++ b/packages/hackbard/pcmcia-cs/pcmcia-cs @@ -0,0 +1,18 @@ +# hdw - linux pcmcia-cs package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.2.8 +# [S] 3-1 +# [D] pcmcia-cs-3.2.8.tar.gz http://pcmcia-cs.sourceforge.net/ftp/ + +pre_install() { + echo "" | make config + } + +post_install() { + mv -v $root/etc/init.d/init.d/pcmcia $root/etc/init.d + rm -fv $root/etc/init.d/rc?.d/*pcmcia + rm -rfv $root/etc/init.d/{init.d,rc0.d,rc6.d} + rm -rfv $root/etc/rc.d + } diff --git a/packages/hackbard/pcmcia-cs/use_linux_srctree.patch b/packages/hackbard/pcmcia-cs/use_linux_srctree.patch new file mode 100644 index 0000000..38bd0e9 --- /dev/null +++ b/packages/hackbard/pcmcia-cs/use_linux_srctree.patch @@ -0,0 +1,10 @@ +--- ./Configure.orig 2004-07-14 15:29:44.000000000 +0200 ++++ ./Configure 2004-07-14 15:30:48.000000000 +0200 +@@ -381,6 +381,7 @@ + CONF_SRC=$ans + echo "" + fi ++CONF_SRC=2 + echo "CONF_SRC=$CONF_SRC" >> $CONFIG + + if [ $CONF_SRC = 1 ] ; then diff --git a/packages/hackbard/pine/pine b/packages/hackbard/pine/pine new file mode 100644 index 0000000..58ec453 --- /dev/null +++ b/packages/hackbard/pine/pine @@ -0,0 +1,19 @@ +# hdw - linux pine package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.61 +# [S] 3-2 +# [D] pine4.61.tar.bz2 ftp://ftp.cac.washington.edu/pine/ + +build_main() { + yes "y" | ./build SSLDIR=/etc/ssl slx && + cp -v bin/* $root/usr/bin + # documentation + rm -rf $docdir && mkdir -p $docdir/imap + cp -a doc/* $docdir + cp -a imap/docs/* $docdir/imap + # manpages + cp imap/src/imapd/imapd.8 $root/usr/share/man/man8/ + mv $docdir/{pico,pilot,pine}.1 $root/usr/share/man/man1 + } diff --git a/packages/hackbard/procmail/procmail b/packages/hackbard/procmail/procmail new file mode 100644 index 0000000..cc874a8 --- /dev/null +++ b/packages/hackbard/procmail/procmail @@ -0,0 +1,16 @@ +# hdw - linux procmail package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.22 +# [S] 3-2 +# [D] procmail-3.22.tar.gz ftp://ftp.procmail.net/pub/procmail/ + +build_main() { + echo "running make ..." + make < /dev/null && + echo "running make install ..." + make install && + echo "make install-suid ..." + make install-suid + } diff --git a/packages/hackbard/raptor/raptor b/packages/hackbard/raptor/raptor new file mode 100644 index 0000000..1f038e6 --- /dev/null +++ b/packages/hackbard/raptor/raptor @@ -0,0 +1,7 @@ +# hdw - linux raptor package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.3.1 +# [S] 3-10 +# [D] raptor-1.3.1.tar.gz http://www.redland.opensource.ac.uk/dist/source/ diff --git a/packages/hackbard/rcs/conf_sh.patch b/packages/hackbard/rcs/conf_sh.patch new file mode 100644 index 0000000..96317d6 --- /dev/null +++ b/packages/hackbard/rcs/conf_sh.patch @@ -0,0 +1,20 @@ +--- ./src/conf.sh.orig 2003-09-16 18:23:19.000000000 +0200 ++++ ./src/conf.sh 2003-09-16 18:24:21.000000000 +0200 +@@ -73,17 +73,6 @@ + ech='echo -n' dots='... ' + esac + +-$ech >&3 "$0: testing permissions $dots" +-rm -f a.d && +-date >a.d && +-chmod 0 a.d && +-{ test -w a.d || cp /dev/null a.d 2>/dev/null; } && { +- echo >&3 "$n$0: This command should not be run with superuser permissions." +- exit 1 +-} +-echo >&3 OK +-rm -f a.d || exit +- + $ech >&3 "$0: testing compiler for plausibility $dots" + echo 'main() { return 0; }' >a.c + rm -f a.exe a.out || exit diff --git a/packages/hackbard/rcs/rcs b/packages/hackbard/rcs/rcs new file mode 100644 index 0000000..3c15ab0 --- /dev/null +++ b/packages/hackbard/rcs/rcs @@ -0,0 +1,10 @@ +# hdw-linux rcs extensions +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 5.7 +# [S] 3-1 +# [D] rcs-5.7.tar.Z http://www.cs.purdue.edu/homes/trinkle/RCS/ + +confopt="--prefix=$prefix --target=$hdw_arch_target" +confopt="$confopt --host=$hdw_arch_target --build=$hdw_arch_build" diff --git a/packages/hackbard/root-tail/root-tail b/packages/hackbard/root-tail/root-tail new file mode 100644 index 0000000..b0f278c --- /dev/null +++ b/packages/hackbard/root-tail/root-tail @@ -0,0 +1,15 @@ +# hdw - linux root-tail package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.1 +# [S] 3-7 +# [D] root-tail-1.1.tar.gz http://www.goof.com/pcg/marc/data/ + +pre_install() { + xmkmf -a + } + +post_install() { + make install.man + } diff --git a/packages/hackbard/rsync/rsync b/packages/hackbard/rsync/rsync new file mode 100644 index 0000000..38677b7 --- /dev/null +++ b/packages/hackbard/rsync/rsync @@ -0,0 +1,11 @@ +# hdw-linux rsync extensions + +# author: hackbard + +# [S] 3-1 +# [V] 2.6.2 +# [D] rsync-2.6.2.tar.gz http://rsync.samba.org/ftp/rsync/ + +pre_install() { + export STRIP="--strip" + } diff --git a/packages/hackbard/screen/screen b/packages/hackbard/screen/screen new file mode 100644 index 0000000..ae95dd2 --- /dev/null +++ b/packages/hackbard/screen/screen @@ -0,0 +1,8 @@ +# hdw - linux screen package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.0.2 +# [S] 3-1 +# [D] screen-4.0.2.tar.gz ftp://ftp.uni-erlangen.de/pub/utilities/screen/ + diff --git a/packages/hackbard/scummvm/scummvm b/packages/hackbard/scummvm/scummvm new file mode 100644 index 0000000..a3602ef --- /dev/null +++ b/packages/hackbard/scummvm/scummvm @@ -0,0 +1,14 @@ +# hdw - linux scummvm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.6.0 +# [S] 3-9 +# [D] scummvm-0.6.0.tar.bz2 http://puzzle.dl.sourceforge.net/sourceforge/scummvm/ + +build_main() { + ./configure $confopt + make && + mkdir -p $prefix/bin && + cp scummvm $prefix/bin + } diff --git a/packages/hackbard/sendmail/Makefile b/packages/hackbard/sendmail/Makefile new file mode 100644 index 0000000..6114baf --- /dev/null +++ b/packages/hackbard/sendmail/Makefile @@ -0,0 +1,26 @@ +# hdw - linux /etc/mail/Makefile +# +# author: hackbard@hackdaworld.dyndns.org +# + +all: sendmail.cf aliases.db virtusertable.db access.db mailertable.db + +aliases.db: aliases sendmail.cf + newaliases + +sendmail.cf: sendmail.mc + m4 m4/cf.m4 sendmail.mc > sendmail.cf + +virtusertable.db: virtusertable + makemap hash virtusertable.db < virtusertable + +access.db: access + makemap hash access.db < access + +mailertable.db: mailertable + makemap hash mailertable.db < mailertable + +clean: + rm -f *~ sendmail.cf aliases.db access.db + rm -f virtusertable.db mailertable.db + diff --git a/packages/hackbard/sendmail/aliases b/packages/hackbard/sendmail/aliases new file mode 100644 index 0000000..e8ac471 --- /dev/null +++ b/packages/hackbard/sendmail/aliases @@ -0,0 +1,8 @@ +# hdw - linux /etc/mail/aliases +# +# author: hackbard@hackdaworld.dyndns.org +# + +postmaster:root +nobody:/dev/null + diff --git a/packages/hackbard/sendmail/local-host-names b/packages/hackbard/sendmail/local-host-names new file mode 100644 index 0000000..befbc0c --- /dev/null +++ b/packages/hackbard/sendmail/local-host-names @@ -0,0 +1,7 @@ +# hdw - linux /etc/mail/local-host-names +# +# author: hackbard@hackdaworld.dyndns.org +# + +localhost + diff --git a/packages/hackbard/sendmail/sendmail b/packages/hackbard/sendmail/sendmail new file mode 100644 index 0000000..a5b9cc9 --- /dev/null +++ b/packages/hackbard/sendmail/sendmail @@ -0,0 +1,37 @@ +# hdw - linux sendmail package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 8.13.0 +# [S] 3-2 +# [D] sendmail.8.13.0.tar.gz ftp://ftp.sendmail.org/pub/sendmail/ + +pre_install() { + # some sendmail config files + rm -rf $root/etc/mail ; mkdir -p $root/etc/mail + cp $confdir/{Makefile,aliases,local-host-names} $root/etc/mail + ln -sf mail/sendmail.cf $root/etc/sendmail.cf + cp -r cf/* $root/etc/mail + cp cf/cf/generic-linux.mc $root/etc/mail/sendmail.mc + } + +build_main() { + cp $confdir/site.config.m4 ./devtools/Site/ + ./Build && ./Build install + } + +post_install() { + # documentation + cd ./doc/op + sed 's/groff/GROFF_NO_SGR=1 groff/' Makefile > tmp~ + mv tmp~ Makefile + make op.txt + mkdir -p $docdir + install -m 644 op.ps op.txt $docdir + # create configs + cd $root/etc/mail + chown -R .mail . + touch {virtusertable,access,mailertable} + make + cd - + } diff --git a/packages/hackbard/sendmail/sendmail.init b/packages/hackbard/sendmail/sendmail.init new file mode 100644 index 0000000..8931163 --- /dev/null +++ b/packages/hackbard/sendmail/sendmail.init @@ -0,0 +1,2 @@ +params="-bd -q15m" +s_value=45 diff --git a/packages/hackbard/sendmail/sendmail.setup b/packages/hackbard/sendmail/sendmail.setup new file mode 100644 index 0000000..edd962f --- /dev/null +++ b/packages/hackbard/sendmail/sendmail.setup @@ -0,0 +1,10 @@ +setup_block() { + useradd -u 2000 -g mail smmsp || true + chmod 1777 /tmp + chmod 1777 /var/mail + mkdir -p /var/spool/mqueue + } + +uninstall_block() { + userdel smmsp || true + } diff --git a/packages/hackbard/sendmail/site.config.m4 b/packages/hackbard/sendmail/site.config.m4 new file mode 100644 index 0000000..1245f6f --- /dev/null +++ b/packages/hackbard/sendmail/site.config.m4 @@ -0,0 +1,7 @@ +APPENDDEF(`confFORCE_RMAIL') +define(`confGBINGRP',mail') +define(`confMANGRP',`root') +define(`confMANOWN',`root') +define(`confSBINGRP',`root') +define(`confUBINGRP',`root') +define(`confUBINOWN',`root') diff --git a/packages/hackbard/sersniff/sersniff b/packages/hackbard/sersniff/sersniff new file mode 100644 index 0000000..fffb334 --- /dev/null +++ b/packages/hackbard/sersniff/sersniff @@ -0,0 +1,14 @@ +# hdw - linux sersniff package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.0.4 +# [S] 3-3 +# [D] sersniff-0.0.4.tar.gz http://www.earth.li/projectpurple/files/ + +build_main() { + make && + cp sersniff $prefix/bin && + chown root.root $prefix/bin/sersniff && + chmod 750 $prefix/bin/sersniff + } diff --git a/packages/hackbard/sersniff/sersniff-fprintf-bug.patch b/packages/hackbard/sersniff/sersniff-fprintf-bug.patch new file mode 100644 index 0000000..724ca30 --- /dev/null +++ b/packages/hackbard/sersniff/sersniff-fprintf-bug.patch @@ -0,0 +1,30 @@ +--- old/sersniff.c.orig Mon Oct 14 12:33:29 2002 ++++ new/sersniff.c Mon Oct 14 12:36:14 2002 +@@ -228,26 +228,7 @@ + + void usage() + { +- fprintf(stderr,"sersniff v%s +- +-Usage: +-sersniff [-h] [-i DEV | -l PORT] [-o DEV | -c HOST:PORT] [-b BAUD] [-w USEC] +--h This help +--x Show hex characters instead of alpha +--f PRINTF_OPTS printf style options for printing hex characters +- when '-x' switch is given (default \"<%%02hX>\") +--i DEVICE Port 1 device (defaults to /dev/ttyS0). Use host:port for +- TCP. +--1 PORT1_NAME Port 1 name to be printed (defaults to 'Port1') +--o DEVICE Port 2 device (defaults to /dev/ttyS1). Use :port for TCP. +--2 PORT2_NAME Port 2 name to be printed (defaults to 'Port2') +--b BAUD Baud rate (Defaults to 19200) +--n No port configuration (do not set BAUD or change settings) +--w USECS How many microsecs to wait before reporting a delay +- (default is %d) +--s Silent - don't pass data from port1 <=> port2, +- just display what we see from them. +-",VERSION,USEC); ++ fprintf(stderr,"sersniff v%s -- read manpage --\n",VERSION,USEC); + exit(1); + } + diff --git a/packages/hackbard/sp12/sp12 b/packages/hackbard/sp12/sp12 new file mode 100644 index 0000000..058c521 --- /dev/null +++ b/packages/hackbard/sp12/sp12 @@ -0,0 +1,21 @@ +# hdw - linux sp12 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] v2_0.7 +# [S] 3-2 +# [D] sp12v2_0_7-Linux.tgz http://www.xs4all.nl/~sbolt/Packages/ + +srcdir=SP12${ver} + +build_main() { + mkdir -p $docdir $prefix/bin + cp *.txt *.gif $docdir + cp _sp12dev $docdir/_sp12dev.example + cd Source + make + chown root.root sp12 + chmod 4555 sp12 + cp sp12 $prefix/bin + cd .. + } diff --git a/packages/hackbard/strace/strace b/packages/hackbard/strace/strace new file mode 100644 index 0000000..ba68930 --- /dev/null +++ b/packages/hackbard/strace/strace @@ -0,0 +1,9 @@ +# hdw - linux strace package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.4.98 +# [S] 3-1 +# [D] strace-4.4.98.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/strace/ + +confopt="--prefix=$prefix" diff --git a/packages/hackbard/tetex/tetex b/packages/hackbard/tetex/tetex new file mode 100644 index 0000000..6d3d661 --- /dev/null +++ b/packages/hackbard/tetex/tetex @@ -0,0 +1,47 @@ +# hdw - linux tetex package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.0.2 +# [S] 3-5 +# [D] tetex-src-2.0.2.tar.gz ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/2.0/distrib/ +# [D] tetex-texmf-2.0.2.tar.gz ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/2.0/distrib/ +# [D] tetex-texmfsrc-2.0.2.tar.gz ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/2.0/distrib/ +# [D] graphs.tar.gz http://www.cs.umu.se/~drewes/graphs/ + +srcdir="tetex-src-$ver" +confopt="$confopt --disable-multiplatform" + +pre_install() { + mkdir -p $prefix/share/texmf + mkdir -p $root/src.$package/tex + tar --use-compress-program=gunzip -xf \ + $archdir/tetex-texmf-${ver}.tar.gz -C \ + $root/src.$package/tex + chown -R 0.0 $root/src.$package/tex + cp -a $root/src.$package/tex/* $prefix/share/texmf + rm -rf $root/src.$package/tex/* + tar --use-compress-program=gunzip -xf \ + $archdir/tetex-texmfsrc-${ver}.tar.gz -C \ + $root/src.$package/tex + chown -R 0.0 $root/src.$package/tex + cp -a $root/src.$package/tex/* $prefix/share/texmf + rm -rf $root/src.$package/tex + + # wrong timestamp + #touch ./texk/web2c/tangleboot.p + # new flex + sed 's%$(LEX)%$(LEX) -l%g' texk/web2c/omegafonts/Makefile.in > tmp~ + mv tmp~ texk/web2c/omegafonts/Makefile.in + } + +post_install() { + # installing graphs.sty + mkdir -p $prefix/share/texmf/tex/latex/graphs + tar --use-compress-program=gunzip -xf \ + $archdir/graphs.tar.gz -C \ + $prefix/share/texmf/tex/latex/graphs + chown -R 0.0 $prefix/share/texmf/tex/latex/graphs + echo "\special{header=${prefix}/share/texmf/tex/latex/graphs/graphs.header}" > \ + $prefix/share/texmf/tex/latex/graphs/graphs_config.tex + } diff --git a/packages/hackbard/tpconfig/tpconfig b/packages/hackbard/tpconfig/tpconfig new file mode 100644 index 0000000..cc7d306 --- /dev/null +++ b/packages/hackbard/tpconfig/tpconfig @@ -0,0 +1,12 @@ +# hdw - linux tpconfig package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.1.3 +# [S] 3-1 +# [D] tpconfig-3.1.3.tar.gz http://www.compass.com/tpconfig/ + +post_install() { + mkdir -p $docdir + cp -v README psaux-*.diff $docdir/ + } diff --git a/packages/hackbard/unzip/unzip b/packages/hackbard/unzip/unzip new file mode 100644 index 0000000..81bd2ac --- /dev/null +++ b/packages/hackbard/unzip/unzip @@ -0,0 +1,12 @@ +# hdw - linux unzip package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 551 +# [S] 3-1 +# [D] unzip551.tar.gz ftp://ftp.info-zip.org/pub/infozip/src/ + +build_main() { + make $make_conf generic -f unix/Makefile prefix=$prefix + make $install_conf install -f unix/Makefile prefix=$prefix + } diff --git a/packages/hackbard/vim/vim b/packages/hackbard/vim/vim new file mode 100644 index 0000000..2b7ba72 --- /dev/null +++ b/packages/hackbard/vim/vim @@ -0,0 +1,14 @@ +# hdw - linux vim package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 6.3 +# [S] 3-4 +# [D] vim-6.3.tar.bz2 ftp://ftp.vim.org/pub/vim/unix/ + +srcdir=vim63 + +pre_install() { + echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h + echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h + } diff --git a/packages/hackbard/wine/wine b/packages/hackbard/wine/wine new file mode 100644 index 0000000..c9cb5b6 --- /dev/null +++ b/packages/hackbard/wine/wine @@ -0,0 +1,12 @@ +# hdw - linux wine package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 20040615 +# [S] 3-9 +# [D] Wine-20040615.tar.gz http://belnet.dl.sourceforge.net/sourceforge/wine/ + +post_install() { + rm -r $docdir ; mkdir -p $docdir + cp -r documentation/* $docdir + } diff --git a/packages/hackbard/xdirectfb/xdirectfb b/packages/hackbard/xdirectfb/xdirectfb new file mode 100644 index 0000000..9a5b71d --- /dev/null +++ b/packages/hackbard/xdirectfb/xdirectfb @@ -0,0 +1,29 @@ +# hdw - linux xdirectfb package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-5 +# [D] XDirectFB.tar.bz2 cvs:anonymous:directfb.org:cvs/directfb:XDirectFB +# [D] xc.tar.bz2 sshcvs:anoncvs:anoncvs.xfree86.org:cvs:xc + +srcdir="XDirectFB-$ver" +[ "$ver" = "cvs" ] && srcdir="XDirectFB" + +build_main() { + echo "extracting xfree86 xc source ..." + tar --use-compress-program=bzip2 -xf $archdir/xc.tar.bz2 -C ../ + + echo "applying xdirectfb patch ..." + cd ../xc && + patch -Nfp0 < ../${srcdir}/xc-directfb.diff && + patch -Nfp1 < ../${srcdir}/xc-transparency-extension.diff + + echo "copying over files ..." + cp -a ../${srcdir}/programs/Xserver/hw/directfb \ + programs/Xserver/hw/ && + cp -a ../${srcdir}/config/cf/* config/cf/ && + + echo "not patching host.def - we build this in $prefix/local ..." + make World && make install + } diff --git a/packages/hackbard/zip/zip b/packages/hackbard/zip/zip new file mode 100644 index 0000000..e35bac0 --- /dev/null +++ b/packages/hackbard/zip/zip @@ -0,0 +1,12 @@ +# hdw - linux zip package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 23 +# [S] 3-1 +# [D] zip23.tar.gz ftp://ftp.info-zip.org/pub/infozip/src/ + +build_main() { + make $make_conf generic -f unix/Makefile prefix=$prefix + make $install_conf install -f unix/Makefile prefix=$prefix + } diff --git a/packages/hpc/lam/lam b/packages/hpc/lam/lam new file mode 100644 index 0000000..0a6dfb5 --- /dev/null +++ b/packages/hpc/lam/lam @@ -0,0 +1,10 @@ +# hdw - linux lam package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 7.0.6 +# [S] 3-3 +# [D] lam-7.0.6.tar.bz2 http://www.lam-mpi.org/download/files/ + +confopt="$confopt --without-mpi2cpp --without-romio" +confopt="$confopt --enable-shared --without-fc --with-rsh=ssh" diff --git a/packages/hpc/openmosixuserland/openmosixuserland b/packages/hpc/openmosixuserland/openmosixuserland new file mode 100644 index 0000000..c205cea --- /dev/null +++ b/packages/hpc/openmosixuserland/openmosixuserland @@ -0,0 +1,19 @@ +# hdw - linux openmosixuserland package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.2.4 +# [S] 4-3 +# [D] openMosixUserland-0.2.4.tgz http://belnet.dl.sourceforge.net/sourceforge/openmosix/ + +srcdir="openMosixUserland-${ver}" +pre_install() { + echo "patching configuration file ..." + sed 's%^OPENMOSIX.*%OPENMOSIX = /usr/src/linux%' configuration > \ + config.new && + mv config.new configuration + } + +build_main() { + make + } diff --git a/packages/ia32/bin86/bin86 b/packages/ia32/bin86/bin86 new file mode 100644 index 0000000..985f636 --- /dev/null +++ b/packages/ia32/bin86/bin86 @@ -0,0 +1,10 @@ +# hdw - linux bin86 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.16.16 +# [S] 2-15 +# [D] bin86-0.16.16.tar.gz http://www.cix.co.uk/~mayday/dev86/ + +install_conf="PREFIX=$root/usr $install_conf" + diff --git a/packages/ia32/bootdisk/bootdisk b/packages/ia32/bootdisk/bootdisk new file mode 100644 index 0000000..100943c --- /dev/null +++ b/packages/ia32/bootdisk/bootdisk @@ -0,0 +1,75 @@ +# hdw-linux bootdisk package + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 1.00-pre9 +# [D] busybox-1.00-pre9.tar.bz2 http://www.busybox.net/downloads/ +# [S] 2-19 + +skip=1 +s_reason="bootdisks are deluxe ... (scheduled for 1.0 release ;)" + +srcdir="busybox-$ver" + +pre_install() { + mkdir -p ../bootdisk && cd ../bootdisk + dd if=/dev/zero of=./bootdisk.img bs=1k count=4096 + yes "y" | mke2fs -m 0 ./bootdisk.img + mkdir mnt && mount -t ext2 -o loop ./bootdisk.img mnt + # directories + mkdir -p mnt/{boot,dev,proc,etc/init.d} + mkdir -p mnt/{sbin,bin,lib,mnt,usr,var/log,pkgs} + cd - + } + +build_main() { + # busybox part + cp $hdw_home_dir/misc/arch/${hdw_arch}/busybox.config .config + make + make PREFIX=$root/src.bootdisk/bootdisk/mnt install + } + +post_install() { + cd ../bootdisk + # libc + cp $root/lib/{ld-*.so,libc-*.so} mnt/lib/ + cd mnt/lib + i=ld-*.so ; ln -sf $i ld-linux.so.2 + i=libc-*.so ; ln -sf $i libc.so.6 + cd ../.. + # some more binaries / configs + cp $root/sbin/btee mnt/sbin/ + ln -sf getty mnt/sbin/agetty + ln -sf ash mnt/bin/bash + # hdw-get + cp $root/usr/bin/hdw-get mnt/bin/ + cp $root/etc/hdw-get.conf mnt/etc/ + # init stuff + for i in inittab init.d HOSTNAME passwd group fstab conf; do + cp -r $hdw_home_dir/misc/sysfiles/etc/$i mnt/etc/ + done + cp $confdir/issue mnt/etc/ + # kernel + cp $root/boot/vmlinuz_hdw mnt/boot + # lilo + offset="`ls -s $root/boot/vmlinuz_hdw | awk '{ print $1 }'`" + ((offset += 50)) + cat > mnt/etc/lilo.conf <<-EOF +boot=/dev/floppy/0 +read-write +compact +image=/boot/vmlinuz_hdw +label=hdw-install +append="root=/dev/floppy/0" +EOF + # /dev -- use obsolete devfs!! + mount -tdevfs devfs mnt/dev + mount -tproc proc mnt/proc + lilo -r mnt + umount mnt/dev + umount mnt/proc + # prepare image + umount mnt + mkdir -p $prefix/share/bootdisk + cp bootdisk.img $prefix/share/bootdisk + } diff --git a/packages/ia32/bootdisk/issue b/packages/ia32/bootdisk/issue new file mode 100644 index 0000000..6e10c75 --- /dev/null +++ b/packages/ia32/bootdisk/issue @@ -0,0 +1,16 @@ + + +\t \d -- \U online -- line [\l]. + +welcome to \n (hdw-linux, Kernel \r). + + +you just booted the hdw install system. please read the INSTALL file if you +don't know how to continue. more help is available on: + + - #hackdaworld @ irc.hackdaworld.dyndns.org (irc) + - http://www.hackdaworld.dyndns.org/contents/mailing-list/ (mailing-list) + +enjoy hdw, + + - the hdw crew - diff --git a/packages/ia32/bootdisk/kernel_2_6_x.patch b/packages/ia32/bootdisk/kernel_2_6_x.patch new file mode 100644 index 0000000..5a2532d --- /dev/null +++ b/packages/ia32/bootdisk/kernel_2_6_x.patch @@ -0,0 +1,4820 @@ +diff -Nur ./kernel-headers/asm/boot.h ./kernel-headers/asm/boot.h +--- ./kernel-headers/asm/boot.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/asm/boot.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,15 @@ ++#ifndef _LINUX_BOOT_H ++#define _LINUX_BOOT_H ++ ++/* Don't touch these, unless you really know what you're doing. */ ++#define DEF_INITSEG 0x9000 ++#define DEF_SYSSEG 0x1000 ++#define DEF_SETUPSEG 0x9020 ++#define DEF_SYSSIZE 0x7F00 ++ ++/* Internal svga startup constants */ ++#define NORMAL_VGA 0xffff /* 80x25 mode */ ++#define EXTENDED_VGA 0xfffe /* 80x50 mode */ ++#define ASK_VGA 0xfffd /* ask for it at bootup */ ++ ++#endif +diff -Nur ./kernel-headers/asm/ioctl.h ./kernel-headers/asm/ioctl.h +--- ./kernel-headers/asm/ioctl.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/asm/ioctl.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,75 @@ ++/* $Id: kernel_2_6_x.patch,v 1.1 2004-07-21 08:58:08 hackbard Exp $ ++ * ++ * linux/ioctl.h for Linux by H.H. Bergman. ++ */ ++ ++#ifndef _ASMI386_IOCTL_H ++#define _ASMI386_IOCTL_H ++ ++/* ioctl command encoding: 32 bits total, command in lower 16 bits, ++ * size of the parameter structure in the lower 14 bits of the ++ * upper 16 bits. ++ * Encoding the size of the parameter structure in the ioctl request ++ * is useful for catching programs compiled with old versions ++ * and to avoid overwriting user space outside the user buffer area. ++ * The highest 2 bits are reserved for indicating the ``access mode''. ++ * NOTE: This limits the max parameter size to 16kB -1 ! ++ */ ++ ++/* ++ * The following is for compatibility across the various Linux ++ * platforms. The i386 ioctl numbering scheme doesn't really enforce ++ * a type field. De facto, however, the top 8 bits of the lower 16 ++ * bits are indeed used as a type field, so we might just as well make ++ * this explicit here. Please be sure to use the decoding macros ++ * below from now on. ++ */ ++#define _IOC_NRBITS 8 ++#define _IOC_TYPEBITS 8 ++#define _IOC_SIZEBITS 14 ++#define _IOC_DIRBITS 2 ++ ++#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) ++#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) ++#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) ++#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) ++ ++#define _IOC_NRSHIFT 0 ++#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) ++#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) ++#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) ++ ++/* ++ * Direction bits. ++ */ ++#define _IOC_NONE 0U ++#define _IOC_WRITE 1U ++#define _IOC_READ 2U ++ ++#define _IOC(dir,type,nr,size) \ ++ (((dir) << _IOC_DIRSHIFT) | \ ++ ((type) << _IOC_TYPESHIFT) | \ ++ ((nr) << _IOC_NRSHIFT) | \ ++ ((size) << _IOC_SIZESHIFT)) ++ ++/* used to create numbers */ ++#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) ++#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) ++#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) ++#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) ++ ++/* used to decode ioctl numbers.. */ ++#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) ++#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) ++#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) ++#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) ++ ++/* ...and for the drivers/sound files... */ ++ ++#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) ++#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) ++#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) ++#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) ++#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) ++ ++#endif /* _ASMI386_IOCTL_H */ +diff -Nur ./kernel-headers/asm/page.h ./kernel-headers/asm/page.h +--- ./kernel-headers/asm/page.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/asm/page.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,142 @@ ++#ifndef _I386_PAGE_H ++#define _I386_PAGE_H ++ ++/* PAGE_SHIFT determines the page size */ ++#define PAGE_SHIFT 12 ++#define PAGE_SIZE (1UL << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) ++ ++#ifdef __KERNEL__ ++#ifndef __ASSEMBLY__ ++ ++#include ++ ++#ifdef CONFIG_X86_USE_3DNOW ++ ++#include ++ ++#define clear_page(page) mmx_clear_page((void *)(page)) ++#define copy_page(to,from) mmx_copy_page(to,from) ++ ++#else ++ ++/* ++ * On older X86 processors its not a win to use MMX here it seems. ++ * Maybe the K6-III ? ++ */ ++ ++#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) ++#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) ++ ++#endif ++ ++#define clear_user_page(page, vaddr) clear_page(page) ++#define copy_user_page(to, from, vaddr) copy_page(to, from) ++ ++/* ++ * These are used to make use of C type-checking.. ++ */ ++#if CONFIG_X86_PAE ++typedef struct { unsigned long pte_low, pte_high; } pte_t; ++typedef struct { unsigned long long pmd; } pmd_t; ++typedef struct { unsigned long long pgd; } pgd_t; ++#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) ++#else ++typedef struct { unsigned long pte_low; } pte_t; ++typedef struct { unsigned long pmd; } pmd_t; ++typedef struct { unsigned long pgd; } pgd_t; ++#define pte_val(x) ((x).pte_low) ++#endif ++#define PTE_MASK PAGE_MASK ++ ++typedef struct { unsigned long pgprot; } pgprot_t; ++ ++#define pmd_val(x) ((x).pmd) ++#define pgd_val(x) ((x).pgd) ++#define pgprot_val(x) ((x).pgprot) ++ ++#define __pte(x) ((pte_t) { (x) } ) ++#define __pmd(x) ((pmd_t) { (x) } ) ++#define __pgd(x) ((pgd_t) { (x) } ) ++#define __pgprot(x) ((pgprot_t) { (x) } ) ++ ++#endif /* !__ASSEMBLY__ */ ++ ++/* to align the pointer to the (next) page boundary */ ++#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) ++ ++/* ++ * This handles the memory map.. We could make this a config ++ * option, but too many people screw it up, and too few need ++ * it. ++ * ++ * A __PAGE_OFFSET of 0xC0000000 means that the kernel has ++ * a virtual address space of one gigabyte, which limits the ++ * amount of physical memory you can use to about 950MB. ++ * ++ * If you want more physical memory than this then see the CONFIG_HIGHMEM4G ++ * and CONFIG_HIGHMEM64G options in the kernel configuration. ++ */ ++ ++#define __PAGE_OFFSET (0xC0000000) ++ ++/* ++ * This much address space is reserved for vmalloc() and iomap() ++ * as well as fixmap mappings. ++ */ ++#define __VMALLOC_RESERVE (128 << 20) ++ ++#ifndef __ASSEMBLY__ ++ ++/* ++ * Tell the user there is some problem. Beep too, so we can ++ * see^H^H^Hhear bugs in early bootup as well! ++ * The offending file and line are encoded after the "officially ++ * undefined" opcode for parsing in the trap handler. ++ */ ++ ++#if 1 /* Set to zero for a slightly smaller kernel */ ++#define BUG() \ ++ __asm__ __volatile__( "ud2\n" \ ++ "\t.word %c0\n" \ ++ "\t.long %c1\n" \ ++ : : "i" (__LINE__), "i" (__FILE__)) ++#else ++#define BUG() __asm__ __volatile__("ud2\n") ++#endif ++ ++#define PAGE_BUG(page) do { \ ++ BUG(); \ ++} while (0) ++ ++/* Pure 2^n version of get_order */ ++static __inline__ int get_order(unsigned long size) ++{ ++ int order; ++ ++ size = (size-1) >> (PAGE_SHIFT-1); ++ order = -1; ++ do { ++ size >>= 1; ++ order++; ++ } while (size); ++ return order; ++} ++ ++#endif /* __ASSEMBLY__ */ ++ ++#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) ++#define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) ++#define __MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) ++#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE)) ++#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) ++#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) ++#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT)) ++#define VALID_PAGE(page) ((page - mem_map) < max_mapnr) ++ ++#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ ++ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _I386_PAGE_H */ +diff -Nur ./kernel-headers/asm/types.h ./kernel-headers/asm/types.h +--- ./kernel-headers/asm/types.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/asm/types.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,57 @@ ++#ifndef _I386_TYPES_H ++#define _I386_TYPES_H ++ ++typedef unsigned short umode_t; ++ ++/* ++ * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the ++ * header files exported to user space ++ */ ++ ++typedef __signed__ char __s8; ++typedef unsigned char __u8; ++ ++typedef __signed__ short __s16; ++typedef unsigned short __u16; ++ ++typedef __signed__ int __s32; ++typedef unsigned int __u32; ++ ++#if defined(__GNUC__) && !defined(__STRICT_ANSI__) ++typedef __signed__ long long __s64; ++typedef unsigned long long __u64; ++#endif ++ ++/* ++ * These aren't exported outside the kernel to avoid name space clashes ++ */ ++#ifdef __KERNEL__ ++ ++#include ++ ++typedef signed char s8; ++typedef unsigned char u8; ++ ++typedef signed short s16; ++typedef unsigned short u16; ++ ++typedef signed int s32; ++typedef unsigned int u32; ++ ++typedef signed long long s64; ++typedef unsigned long long u64; ++ ++#define BITS_PER_LONG 32 ++ ++/* DMA addresses come in generic and 64-bit flavours. */ ++ ++#ifdef CONFIG_HIGHMEM64G ++typedef u64 dma_addr_t; ++#else ++typedef u32 dma_addr_t; ++#endif ++typedef u64 dma64_addr_t; ++ ++#endif /* __KERNEL__ */ ++ ++#endif +diff -Nur ./kernel-headers/asm/unistd.h ./kernel-headers/asm/unistd.h +--- ./kernel-headers/asm/unistd.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/asm/unistd.h 2004-07-10 02:55:27.000000000 +0200 +@@ -0,0 +1,386 @@ ++#ifndef _ASM_I386_UNISTD_H_ ++#define _ASM_I386_UNISTD_H_ ++ ++/* ++ * This file contains the system call numbers. ++ */ ++ ++#define __NR_exit 1 ++#define __NR_fork 2 ++#define __NR_read 3 ++#define __NR_write 4 ++#define __NR_open 5 ++#define __NR_close 6 ++#define __NR_waitpid 7 ++#define __NR_creat 8 ++#define __NR_link 9 ++#define __NR_unlink 10 ++#define __NR_execve 11 ++#define __NR_chdir 12 ++#define __NR_time 13 ++#define __NR_mknod 14 ++#define __NR_chmod 15 ++#define __NR_lchown 16 ++#define __NR_break 17 ++#define __NR_oldstat 18 ++#define __NR_lseek 19 ++#define __NR_getpid 20 ++#define __NR_mount 21 ++#define __NR_umount 22 ++#define __NR_setuid 23 ++#define __NR_getuid 24 ++#define __NR_stime 25 ++#define __NR_ptrace 26 ++#define __NR_alarm 27 ++#define __NR_oldfstat 28 ++#define __NR_pause 29 ++#define __NR_utime 30 ++#define __NR_stty 31 ++#define __NR_gtty 32 ++#define __NR_access 33 ++#define __NR_nice 34 ++#define __NR_ftime 35 ++#define __NR_sync 36 ++#define __NR_kill 37 ++#define __NR_rename 38 ++#define __NR_mkdir 39 ++#define __NR_rmdir 40 ++#define __NR_dup 41 ++#define __NR_pipe 42 ++#define __NR_times 43 ++#define __NR_prof 44 ++#define __NR_brk 45 ++#define __NR_setgid 46 ++#define __NR_getgid 47 ++#define __NR_signal 48 ++#define __NR_geteuid 49 ++#define __NR_getegid 50 ++#define __NR_acct 51 ++#define __NR_umount2 52 ++#define __NR_lock 53 ++#define __NR_ioctl 54 ++#define __NR_fcntl 55 ++#define __NR_mpx 56 ++#define __NR_setpgid 57 ++#define __NR_ulimit 58 ++#define __NR_oldolduname 59 ++#define __NR_umask 60 ++#define __NR_chroot 61 ++#define __NR_ustat 62 ++#define __NR_dup2 63 ++#define __NR_getppid 64 ++#define __NR_getpgrp 65 ++#define __NR_setsid 66 ++#define __NR_sigaction 67 ++#define __NR_sgetmask 68 ++#define __NR_ssetmask 69 ++#define __NR_setreuid 70 ++#define __NR_setregid 71 ++#define __NR_sigsuspend 72 ++#define __NR_sigpending 73 ++#define __NR_sethostname 74 ++#define __NR_setrlimit 75 ++#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ ++#define __NR_getrusage 77 ++#define __NR_gettimeofday 78 ++#define __NR_settimeofday 79 ++#define __NR_getgroups 80 ++#define __NR_setgroups 81 ++#define __NR_select 82 ++#define __NR_symlink 83 ++#define __NR_oldlstat 84 ++#define __NR_readlink 85 ++#define __NR_uselib 86 ++#define __NR_swapon 87 ++#define __NR_reboot 88 ++#define __NR_readdir 89 ++#define __NR_mmap 90 ++#define __NR_munmap 91 ++#define __NR_truncate 92 ++#define __NR_ftruncate 93 ++#define __NR_fchmod 94 ++#define __NR_fchown 95 ++#define __NR_getpriority 96 ++#define __NR_setpriority 97 ++#define __NR_profil 98 ++#define __NR_statfs 99 ++#define __NR_fstatfs 100 ++#define __NR_ioperm 101 ++#define __NR_socketcall 102 ++#define __NR_syslog 103 ++#define __NR_setitimer 104 ++#define __NR_getitimer 105 ++#define __NR_stat 106 ++#define __NR_lstat 107 ++#define __NR_fstat 108 ++#define __NR_olduname 109 ++#define __NR_iopl 110 ++#define __NR_vhangup 111 ++#define __NR_idle 112 ++#define __NR_vm86old 113 ++#define __NR_wait4 114 ++#define __NR_swapoff 115 ++#define __NR_sysinfo 116 ++#define __NR_ipc 117 ++#define __NR_fsync 118 ++#define __NR_sigreturn 119 ++#define __NR_clone 120 ++#define __NR_setdomainname 121 ++#define __NR_uname 122 ++#define __NR_modify_ldt 123 ++#define __NR_adjtimex 124 ++#define __NR_mprotect 125 ++#define __NR_sigprocmask 126 ++#define __NR_create_module 127 ++#define __NR_init_module 128 ++#define __NR_delete_module 129 ++#define __NR_get_kernel_syms 130 ++#define __NR_quotactl 131 ++#define __NR_getpgid 132 ++#define __NR_fchdir 133 ++#define __NR_bdflush 134 ++#define __NR_sysfs 135 ++#define __NR_personality 136 ++#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ ++#define __NR_setfsuid 138 ++#define __NR_setfsgid 139 ++#define __NR__llseek 140 ++#define __NR_getdents 141 ++#define __NR__newselect 142 ++#define __NR_flock 143 ++#define __NR_msync 144 ++#define __NR_readv 145 ++#define __NR_writev 146 ++#define __NR_getsid 147 ++#define __NR_fdatasync 148 ++#define __NR__sysctl 149 ++#define __NR_mlock 150 ++#define __NR_munlock 151 ++#define __NR_mlockall 152 ++#define __NR_munlockall 153 ++#define __NR_sched_setparam 154 ++#define __NR_sched_getparam 155 ++#define __NR_sched_setscheduler 156 ++#define __NR_sched_getscheduler 157 ++#define __NR_sched_yield 158 ++#define __NR_sched_get_priority_max 159 ++#define __NR_sched_get_priority_min 160 ++#define __NR_sched_rr_get_interval 161 ++#define __NR_nanosleep 162 ++#define __NR_mremap 163 ++#define __NR_setresuid 164 ++#define __NR_getresuid 165 ++#define __NR_vm86 166 ++#define __NR_query_module 167 ++#define __NR_poll 168 ++#define __NR_nfsservctl 169 ++#define __NR_setresgid 170 ++#define __NR_getresgid 171 ++#define __NR_prctl 172 ++#define __NR_rt_sigreturn 173 ++#define __NR_rt_sigaction 174 ++#define __NR_rt_sigprocmask 175 ++#define __NR_rt_sigpending 176 ++#define __NR_rt_sigtimedwait 177 ++#define __NR_rt_sigqueueinfo 178 ++#define __NR_rt_sigsuspend 179 ++#define __NR_pread 180 ++#define __NR_pwrite 181 ++#define __NR_chown 182 ++#define __NR_getcwd 183 ++#define __NR_capget 184 ++#define __NR_capset 185 ++#define __NR_sigaltstack 186 ++#define __NR_sendfile 187 ++#define __NR_getpmsg 188 /* some people actually want streams */ ++#define __NR_putpmsg 189 /* some people actually want streams */ ++#define __NR_vfork 190 ++#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ ++#define __NR_mmap2 192 ++#define __NR_truncate64 193 ++#define __NR_ftruncate64 194 ++#define __NR_stat64 195 ++#define __NR_lstat64 196 ++#define __NR_fstat64 197 ++#define __NR_lchown32 198 ++#define __NR_getuid32 199 ++#define __NR_getgid32 200 ++#define __NR_geteuid32 201 ++#define __NR_getegid32 202 ++#define __NR_setreuid32 203 ++#define __NR_setregid32 204 ++#define __NR_getgroups32 205 ++#define __NR_setgroups32 206 ++#define __NR_fchown32 207 ++#define __NR_setresuid32 208 ++#define __NR_getresuid32 209 ++#define __NR_setresgid32 210 ++#define __NR_getresgid32 211 ++#define __NR_chown32 212 ++#define __NR_setuid32 213 ++#define __NR_setgid32 214 ++#define __NR_setfsuid32 215 ++#define __NR_setfsgid32 216 ++#define __NR_pivot_root 217 ++#define __NR_mincore 218 ++#define __NR_madvise 219 ++#define __NR_madvise1 219 /* delete when C lib stub is removed */ ++#define __NR_getdents64 220 ++#define __NR_fcntl64 221 ++#define __NR_security 223 /* syscall for security modules */ ++#define __NR_gettid 224 ++#define __NR_readahead 225 ++#define __NR_setxattr 226 ++#define __NR_lsetxattr 227 ++#define __NR_fsetxattr 228 ++#define __NR_getxattr 229 ++#define __NR_lgetxattr 230 ++#define __NR_fgetxattr 231 ++#define __NR_listxattr 232 ++#define __NR_llistxattr 233 ++#define __NR_flistxattr 234 ++#define __NR_removexattr 235 ++#define __NR_lremovexattr 236 ++#define __NR_fremovexattr 237 ++#define __NR_tkill 238 ++#define __NR_sendfile64 239 ++#define __NR_futex 240 ++#define __NR_sched_setaffinity 241 ++#define __NR_sched_getaffinity 242 ++#define __NR_set_thread_area 243 ++#define __NR_get_thread_area 244 ++#define __NR_io_setup 245 ++#define __NR_io_destroy 246 ++#define __NR_io_getevents 247 ++#define __NR_io_submit 248 ++#define __NR_io_cancel 249 ++#define __NR_alloc_hugepages 250 ++#define __NR_free_hugepages 251 ++#define __NR_exit_group 252 ++ ++/* user-visible error numbers are in the range -1 - -124: see */ ++ ++#define __syscall_return(type, res) \ ++do { \ ++ if ((unsigned long)(res) >= (unsigned long)(-125)) { \ ++ errno = -(res); \ ++ res = -1; \ ++ } \ ++ return (type) (res); \ ++} while (0) ++ ++/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ ++#define _syscall0(type,name) \ ++type name(void) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name)); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall1(type,name,type1,arg1) \ ++type name(type1 arg1) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall2(type,name,type1,arg1,type2,arg2) \ ++type name(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ ++type name(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5,type6,arg6) \ ++type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ ++{ \ ++long __res; \ ++__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x80 ; pop %%ebp" \ ++ : "=a" (__res) \ ++ : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ ++ "0" ((long)(arg6))); \ ++__syscall_return(type,__res); \ ++} ++ ++#ifdef __KERNEL_SYSCALLS__ ++ ++/* ++ * we need this inline - forking from kernel space will result ++ * in NO COPY ON WRITE (!!!), until an execve is executed. This ++ * is no problem, but for the stack. This is handled by not letting ++ * main() use the stack at all after fork(). Thus, no function ++ * calls - which means inline code for fork too, as otherwise we ++ * would use the stack upon exit from 'fork()'. ++ * ++ * Actually only pause and fork are needed inline, so that there ++ * won't be any messing with the stack from main(), but we define ++ * some others too. ++ */ ++#define __NR__exit __NR_exit ++static inline _syscall0(int,pause) ++static inline _syscall0(int,sync) ++static inline _syscall0(pid_t,setsid) ++static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) ++static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) ++static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) ++static inline _syscall1(int,dup,int,fd) ++static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) ++static inline _syscall3(int,open,const char *,file,int,flag,int,mode) ++static inline _syscall1(int,close,int,fd) ++static inline _syscall1(int,_exit,int,exitcode) ++static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) ++static inline _syscall1(int,delete_module,const char *,name) ++ ++static inline pid_t wait(int * wait_stat) ++{ ++ return waitpid(-1,wait_stat,0); ++} ++ ++#endif ++ ++#endif /* _ASM_I386_UNISTD_H_ */ +diff -Nur ./kernel-headers/linux/config.h ./kernel-headers/linux/config.h +--- ./kernel-headers/linux/config.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/config.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,6 @@ ++#ifndef _LINUX_CONFIG_H ++#define _LINUX_CONFIG_H ++ ++#include ++ ++#endif +diff -Nur ./kernel-headers/linux/fd.h ./kernel-headers/linux/fd.h +--- ./kernel-headers/linux/fd.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/fd.h 2004-07-10 02:59:14.000000000 +0200 +@@ -0,0 +1,372 @@ ++#ifndef _LINUX_FD_H ++#define _LINUX_FD_H ++ ++#include ++ ++/* New file layout: Now the ioctl definitions immediately follow the ++ * definitions of the structures that they use */ ++ ++/* ++ * Geometry ++ */ ++struct floppy_struct { ++ unsigned int size, /* nr of sectors total */ ++ sect, /* sectors per track */ ++ head, /* nr of heads */ ++ track, /* nr of tracks */ ++ stretch; /* !=0 means double track steps */ ++#define FD_STRETCH 1 ++#define FD_SWAPSIDES 2 ++ ++ unsigned char gap, /* gap1 size */ ++ ++ rate, /* data rate. |= 0x40 for perpendicular */ ++#define FD_2M 0x4 ++#define FD_SIZECODEMASK 0x38 ++#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8) ++#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \ ++ 512 : 128 << FD_SIZECODE(floppy) ) ++#define FD_PERP 0x40 ++ ++ spec1, /* stepping rate, head unload time */ ++ fmt_gap; /* gap2 size */ ++ const char * name; /* used only for predefined formats */ ++}; ++ ++ ++/* commands needing write access have 0x40 set */ ++/* commands needing super user access have 0x80 set */ ++ ++#define FDCLRPRM _IO(2, 0x41) ++/* clear user-defined parameters */ ++ ++#define FDSETPRM _IOW(2, 0x42, struct floppy_struct) ++#define FDSETMEDIAPRM FDSETPRM ++/* set user-defined parameters for current media */ ++ ++#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct) ++#define FDGETPRM _IOR(2, 0x04, struct floppy_struct) ++#define FDDEFMEDIAPRM FDDEFPRM ++#define FDGETMEDIAPRM FDGETPRM ++/* set/get disk parameters */ ++ ++ ++#define FDMSGON _IO(2,0x45) ++#define FDMSGOFF _IO(2,0x46) ++/* issue/don't issue kernel messages on media type change */ ++ ++ ++/* ++ * Formatting (obsolete) ++ */ ++#define FD_FILL_BYTE 0xF6 /* format fill byte. */ ++ ++struct format_descr { ++ unsigned int device,head,track; ++}; ++ ++#define FDFMTBEG _IO(2,0x47) ++/* begin formatting a disk */ ++#define FDFMTTRK _IOW(2,0x48, struct format_descr) ++/* format the specified track */ ++#define FDFMTEND _IO(2,0x49) ++/* end formatting a disk */ ++ ++ ++/* ++ * Error thresholds ++ */ ++struct floppy_max_errors { ++ unsigned int ++ abort, /* number of errors to be reached before aborting */ ++ read_track, /* maximal number of errors permitted to read an ++ * entire track at once */ ++ reset, /* maximal number of errors before a reset is tried */ ++ recal, /* maximal number of errors before a recalibrate is ++ * tried */ ++ ++ /* ++ * Threshold for reporting FDC errors to the console. ++ * Setting this to zero may flood your screen when using ++ * ultra cheap floppies ;-) ++ */ ++ reporting; ++ ++}; ++ ++#define FDSETEMSGTRESH _IO(2,0x4a) ++/* set fdc error reporting threshold */ ++ ++#define FDFLUSH _IO(2,0x4b) ++/* flush buffers for media; either for verifying media, or for ++ * handling a media change without closing the file descriptor */ ++ ++#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors) ++#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors) ++/* set/get abortion and read_track threshold. See also floppy_drive_params ++ * structure */ ++ ++ ++typedef char floppy_drive_name[16]; ++#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name) ++/* get drive type: 5 1/4 or 3 1/2 */ ++ ++ ++/* ++ * Drive parameters (user modifiable) ++ */ ++struct floppy_drive_params { ++ signed char cmos; /* CMOS type */ ++ ++ /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms ++ * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA). ++ */ ++ unsigned long max_dtr; /* Step rate, usec */ ++ unsigned long hlt; /* Head load/settle time, msec */ ++ unsigned long hut; /* Head unload time (remnant of ++ * 8" drives) */ ++ unsigned long srt; /* Step rate, usec */ ++ ++ unsigned long spinup; /* time needed for spinup (expressed ++ * in jiffies) */ ++ unsigned long spindown; /* timeout needed for spindown */ ++ unsigned char spindown_offset; /* decides in which position the disk ++ * will stop */ ++ unsigned char select_delay; /* delay to wait after select */ ++ unsigned char rps; /* rotations per second */ ++ unsigned char tracks; /* maximum number of tracks */ ++ unsigned long timeout; /* timeout for interrupt requests */ ++ ++ unsigned char interleave_sect; /* if there are more sectors, use ++ * interleave */ ++ ++ struct floppy_max_errors max_errors; ++ ++ char flags; /* various flags, including ftd_msg */ ++/* ++ * Announce successful media type detection and media information loss after ++ * disk changes. ++ * Also used to enable/disable printing of overrun warnings. ++ */ ++ ++#define FTD_MSG 0x10 ++#define FD_BROKEN_DCL 0x20 ++#define FD_DEBUG 0x02 ++#define FD_SILENT_DCL_CLEAR 0x4 ++#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware ++ considerations */ ++ ++ char read_track; /* use readtrack during probing? */ ++ ++/* ++ * Auto-detection. Each drive type has eight formats which are ++ * used in succession to try to read the disk. If the FDC cannot lock onto ++ * the disk, the next format is tried. This uses the variable 'probing'. ++ */ ++ short autodetect[8]; /* autodetected formats */ ++ ++ int checkfreq; /* how often should the drive be checked for disk ++ * changes */ ++ int native_format; /* native format of this drive */ ++}; ++ ++enum { ++ FD_NEED_TWADDLE_BIT, /* more magic */ ++ FD_VERIFY_BIT, /* inquire for write protection */ ++ FD_DISK_NEWCHANGE_BIT, /* change detected, and no action undertaken yet ++ * to clear media change status */ ++ FD_UNUSED_BIT, ++ FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */ ++ FD_DISK_WRITABLE_BIT /* disk is writable */ ++}; ++ ++#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params) ++#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params) ++/* set/get drive parameters */ ++ ++ ++/* ++ * Current drive state (not directly modifiable by user, readonly) ++ */ ++struct floppy_drive_struct { ++ unsigned long flags; ++/* values for these flags */ ++#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT) ++#define FD_VERIFY (1 << FD_VERIFY_BIT) ++#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT) ++#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT) ++#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT) ++ ++ unsigned long spinup_date; ++ unsigned long select_date; ++ unsigned long first_read_date; ++ short probed_format; ++ short track; /* current track */ ++ short maxblock; /* id of highest block read */ ++ short maxtrack; /* id of highest half track read */ ++ int generation; /* how many diskchanges? */ ++ ++/* ++ * (User-provided) media information is _not_ discarded after a media change ++ * if the corresponding keep_data flag is non-zero. Positive values are ++ * decremented after each probe. ++ */ ++ int keep_data; ++ ++ /* Prevent "aliased" accesses. */ ++ int fd_ref; ++ int fd_device; ++ unsigned long last_checked; /* when was the drive last checked for a disk ++ * change? */ ++ ++ char *dmabuf; ++ int bufblocks; ++}; ++ ++#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct) ++#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct) ++/* get drive state: GET returns the cached state, POLL polls for new state */ ++ ++ ++/* ++ * reset FDC ++ */ ++enum reset_mode { ++ FD_RESET_IF_NEEDED, /* reset only if the reset flags is set */ ++ FD_RESET_IF_RAWCMD, /* obsolete */ ++ FD_RESET_ALWAYS /* reset always */ ++}; ++#define FDRESET _IO(2, 0x54) ++ ++ ++/* ++ * FDC state ++ */ ++struct floppy_fdc_state { ++ int spec1; /* spec1 value last used */ ++ int spec2; /* spec2 value last used */ ++ int dtr; ++ unsigned char version; /* FDC version code */ ++ unsigned char dor; ++ unsigned long address; /* io address */ ++ unsigned int rawcmd:2; ++ unsigned int reset:1; ++ unsigned int need_configure:1; ++ unsigned int perp_mode:2; ++ unsigned int has_fifo:1; ++ unsigned int driver_version; /* version code for floppy driver */ ++#define FD_DRIVER_VERSION 0x100 ++/* user programs using the floppy API should use floppy_fdc_state to ++ * get the version number of the floppy driver that they are running ++ * on. If this version number is bigger than the one compiled into the ++ * user program (the FD_DRIVER_VERSION define), it should be prepared ++ * to bigger structures ++ */ ++ ++ unsigned char track[4]; ++ /* Position of the heads of the 4 units attached to this FDC, ++ * as stored on the FDC. In the future, the position as stored ++ * on the FDC might not agree with the actual physical ++ * position of these drive heads. By allowing such ++ * disagreement, it will be possible to reset the FDC without ++ * incurring the expensive cost of repositioning all heads. ++ * Right now, these positions are hard wired to 0. */ ++ ++}; ++ ++#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state) ++ ++ ++/* ++ * Asynchronous Write error tracking ++ */ ++struct floppy_write_errors { ++ /* Write error logging. ++ * ++ * These fields can be cleared with the FDWERRORCLR ioctl. ++ * Only writes that were attempted but failed due to a physical media ++ * error are logged. write(2) calls that fail and return an error code ++ * to the user process are not counted. ++ */ ++ ++ unsigned int write_errors; /* number of physical write errors ++ * encountered */ ++ ++ /* position of first and last write errors */ ++ unsigned long first_error_sector; ++ int first_error_generation; ++ unsigned long last_error_sector; ++ int last_error_generation; ++ ++ unsigned int badness; /* highest retry count for a read or write ++ * operation */ ++}; ++ ++#define FDWERRORCLR _IO(2, 0x56) ++/* clear write error and badness information */ ++#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors) ++/* get write error and badness information */ ++ ++ ++/* ++ * Raw commands ++ */ ++/* new interface flag: now we can do them in batches */ ++#define FDHAVEBATCHEDRAWCMD ++ ++struct floppy_raw_cmd { ++ unsigned int flags; ++#define FD_RAW_READ 1 ++#define FD_RAW_WRITE 2 ++#define FD_RAW_NO_MOTOR 4 ++#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */ ++#define FD_RAW_INTR 8 /* wait for an interrupt */ ++#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */ ++#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command ++ * completion */ ++#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */ ++#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */ ++ ++/* more "in" flags */ ++#define FD_RAW_MORE 0x100 /* more records follow */ ++#define FD_RAW_STOP_IF_FAILURE 0x200 /* stop if we encounter a failure */ ++#define FD_RAW_STOP_IF_SUCCESS 0x400 /* stop if command successful */ ++#define FD_RAW_SOFTFAILURE 0x800 /* consider the return value for failure ++ * detection too */ ++ ++/* more "out" flags */ ++#define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */ ++#define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */ ++ ++ void *data; ++ char *kernel_data; /* location of data buffer in the kernel */ ++ struct floppy_raw_cmd *next; /* used for chaining of raw cmd's ++ * within the kernel */ ++ long length; /* in: length of dma transfer. out: remaining bytes */ ++ long phys_length; /* physical length, if different from dma length */ ++ int buffer_length; /* length of allocated buffer */ ++ ++ unsigned char rate; ++ unsigned char cmd_count; ++ unsigned char cmd[16]; ++ unsigned char reply_count; ++ unsigned char reply[16]; ++ int track; ++ int resultcode; ++ ++ int reserved1; ++ int reserved2; ++}; ++ ++#define FDRAWCMD _IO(2, 0x58) ++/* send a raw command to the fdc. Structure size not included, because of ++ * batches */ ++ ++#define FDTWADDLE _IO(2, 0x59) ++/* flicker motor-on bit before reading a sector. Experimental */ ++ ++ ++#define FDEJECT _IO(2, 0x5a) ++/* eject the disk */ ++ ++#endif +diff -Nur ./kernel-headers/linux/fs.h ./kernel-headers/linux/fs.h +--- ./kernel-headers/linux/fs.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/fs.h 2004-07-10 02:59:14.000000000 +0200 +@@ -0,0 +1,1675 @@ ++#ifndef _LINUX_FS_H ++#define _LINUX_FS_H ++ ++/* ++ * This file has definitions for some important file table ++ * structures etc. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++struct poll_table_struct; ++ ++ ++/* ++ * It's silly to have NR_OPEN bigger than NR_FILE, but you can change ++ * the file limit at runtime and only root can increase the per-process ++ * nr_file rlimit, so it's safe to set up a ridiculously high absolute ++ * upper limit on files-per-process. ++ * ++ * Some programs (notably those using select()) may have to be ++ * recompiled to take full advantage of the new limits.. ++ */ ++ ++/* Fixed constants first: */ ++#undef NR_OPEN ++#define NR_OPEN (1024*1024) /* Absolute upper limit on fd num */ ++#define INR_OPEN 1024 /* Initial setting for nfile rlimits */ ++ ++#define BLOCK_SIZE_BITS 10 ++#define BLOCK_SIZE (1<i_sb->s_flags & (flg)) ++ ++#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) ++#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC)) ++#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) ++ ++#define IS_QUOTAINIT(inode) ((inode)->i_flags & S_QUOTA) ++#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) ++#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) ++#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) ++#define IS_NOATIME(inode) (__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME)) ++#define IS_NODIRATIME(inode) __IS_FLG(inode, MS_NODIRATIME) ++ ++#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) ++ ++/* the read-only stuff doesn't really belong here, but any other place is ++ probably as bad and I don't want to create yet another include file. */ ++ ++#define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */ ++#define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */ ++#define BLKRRPART _IO(0x12,95) /* re-read partition table */ ++#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ ++#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ ++#define BLKRASET _IO(0x12,98) /* Set read ahead for block device */ ++#define BLKRAGET _IO(0x12,99) /* get current read ahead setting */ ++#define BLKFRASET _IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ ++#define BLKFRAGET _IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */ ++#define BLKSECTSET _IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */ ++#define BLKSECTGET _IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */ ++#define BLKSSZGET _IO(0x12,104)/* get block device sector size */ ++#if 0 ++#define BLKPG _IO(0x12,105)/* See blkpg.h */ ++#define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))/* elevator get */ ++#define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))/* elevator set */ ++/* This was here just to show that the number is taken - ++ probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */ ++#endif ++/* A jump here: 108-111 have been used for various private purposes. */ ++#define BLKBSZGET _IOR(0x12,112,sizeof(int)) ++#define BLKBSZSET _IOW(0x12,113,sizeof(int)) ++#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */ ++ ++#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ ++#define FIBMAP _IO(0x00,1) /* bmap access */ ++#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ ++ ++#ifdef __KERNEL__ ++ ++#include ++#include ++ ++extern void update_atime (struct inode *); ++extern void update_mctime (struct inode *); ++#define UPDATE_ATIME(inode) update_atime (inode) ++ ++extern void buffer_init(unsigned long); ++extern void inode_init(unsigned long); ++extern void mnt_init(unsigned long); ++extern void files_init(unsigned long mempages); ++ ++/* bh state bits */ ++enum bh_state_bits { ++ BH_Uptodate, /* 1 if the buffer contains valid data */ ++ BH_Dirty, /* 1 if the buffer is dirty */ ++ BH_Lock, /* 1 if the buffer is locked */ ++ BH_Req, /* 0 if the buffer has been invalidated */ ++ BH_Mapped, /* 1 if the buffer has a disk mapping */ ++ BH_New, /* 1 if the buffer is new and not yet written out */ ++ BH_Async, /* 1 if the buffer is under end_buffer_io_async I/O */ ++ BH_Wait_IO, /* 1 if we should write out this buffer */ ++ BH_Launder, /* 1 if we can throttle on this buffer */ ++ BH_Attached, /* 1 if b_inode_buffers is linked into a list */ ++ BH_JBD, /* 1 if it has an attached journal_head */ ++ BH_Sync, /* 1 if the buffer is a sync read */ ++ ++ BH_PrivateStart,/* not a state bit, but the first bit available ++ * for private allocation by other entities ++ */ ++}; ++ ++#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512) ++ ++/* ++ * Try to keep the most commonly used fields in single cache lines (16 ++ * bytes) to improve performance. This ordering should be ++ * particularly beneficial on 32-bit processors. ++ * ++ * We use the first 16 bytes for the data which is used in searches ++ * over the block hash lists (ie. getblk() and friends). ++ * ++ * The second 16 bytes we use for lru buffer scans, as used by ++ * sync_buffers() and refill_freelist(). -- sct ++ */ ++struct buffer_head { ++ /* First cache line: */ ++ struct buffer_head *b_next; /* Hash queue list */ ++ unsigned long b_blocknr; /* block number */ ++ unsigned short b_size; /* block size */ ++ unsigned short b_list; /* List that this buffer appears */ ++ kdev_t b_dev; /* device (B_FREE = free) */ ++ ++ atomic_t b_count; /* users using this block */ ++ kdev_t b_rdev; /* Real device */ ++ unsigned long b_state; /* buffer state bitmap (see above) */ ++ unsigned long b_flushtime; /* Time when (dirty) buffer should be written */ ++ ++ struct buffer_head *b_next_free;/* lru/free list linkage */ ++ struct buffer_head *b_prev_free;/* doubly linked list of buffers */ ++ struct buffer_head *b_this_page;/* circular list of buffers in one page */ ++ struct buffer_head *b_reqnext; /* request queue */ ++ ++ struct buffer_head **b_pprev; /* doubly linked list of hash-queue */ ++ char * b_data; /* pointer to data block */ ++ struct page *b_page; /* the page this bh is mapped to */ ++ void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */ ++ void *b_private; /* reserved for b_end_io */ ++ ++ unsigned long b_rsector; /* Real buffer location on disk */ ++ wait_queue_head_t b_wait; ++ ++ struct list_head b_inode_buffers; /* doubly linked list of inode dirty buffers */ ++}; ++ ++typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate); ++void init_buffer(struct buffer_head *, bh_end_io_t *, void *); ++ ++#define __buffer_state(bh, state) (((bh)->b_state & (1UL << BH_##state)) != 0) ++ ++#define buffer_uptodate(bh) __buffer_state(bh,Uptodate) ++#define buffer_dirty(bh) __buffer_state(bh,Dirty) ++#define buffer_locked(bh) __buffer_state(bh,Lock) ++#define buffer_req(bh) __buffer_state(bh,Req) ++#define buffer_mapped(bh) __buffer_state(bh,Mapped) ++#define buffer_new(bh) __buffer_state(bh,New) ++#define buffer_async(bh) __buffer_state(bh,Async) ++#define buffer_launder(bh) __buffer_state(bh,Launder) ++ ++#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) ++ ++extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long offset); ++ ++#define touch_buffer(bh) mark_page_accessed(bh->b_page) ++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* ++ * Attribute flags. These should be or-ed together to figure out what ++ * has been changed! ++ */ ++#define ATTR_MODE 1 ++#define ATTR_UID 2 ++#define ATTR_GID 4 ++#define ATTR_SIZE 8 ++#define ATTR_ATIME 16 ++#define ATTR_MTIME 32 ++#define ATTR_CTIME 64 ++#define ATTR_ATIME_SET 128 ++#define ATTR_MTIME_SET 256 ++#define ATTR_FORCE 512 /* Not a change, but a change it */ ++#define ATTR_ATTR_FLAG 1024 ++ ++/* ++ * This is the Inode Attributes structure, used for notify_change(). It ++ * uses the above definitions as flags, to know which values have changed. ++ * Also, in this manner, a Filesystem can look at only the values it cares ++ * about. Basically, these are the attributes that the VFS layer can ++ * request to change from the FS layer. ++ * ++ * Derek Atkins 94-10-20 ++ */ ++struct iattr { ++ unsigned int ia_valid; ++ umode_t ia_mode; ++ uid_t ia_uid; ++ gid_t ia_gid; ++ loff_t ia_size; ++ time_t ia_atime; ++ time_t ia_mtime; ++ time_t ia_ctime; ++ unsigned int ia_attr_flags; ++}; ++ ++/* ++ * This is the inode attributes flag definitions ++ */ ++#define ATTR_FLAG_SYNCRONOUS 1 /* Syncronous write */ ++#define ATTR_FLAG_NOATIME 2 /* Don't update atime */ ++#define ATTR_FLAG_APPEND 4 /* Append-only file */ ++#define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */ ++#define ATTR_FLAG_NODIRATIME 16 /* Don't update atime for directory */ ++ ++/* ++ * Includes for diskquotas and mount structures. ++ */ ++#include ++#include ++ ++/* ++ * oh the beauties of C type declarations. ++ */ ++struct page; ++struct address_space; ++struct kiobuf; ++ ++struct address_space_operations { ++ int (*writepage)(struct page *); ++ int (*readpage)(struct file *, struct page *); ++ int (*sync_page)(struct page *); ++ /* ++ * ext3 requires that a successful prepare_write() call be followed ++ * by a commit_write() call - they must be balanced ++ */ ++ int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); ++ int (*commit_write)(struct file *, struct page *, unsigned, unsigned); ++ /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ ++ int (*bmap)(struct address_space *, long); ++ int (*flushpage) (struct page *, unsigned long); ++ int (*releasepage) (struct page *, int); ++#define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */ ++ int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int); ++#define KERNEL_HAS_DIRECT_FILEIO /* Unfortunate kludge due to lack of foresight */ ++ int (*direct_fileIO)(int, struct file *, struct kiobuf *, unsigned long, int); ++ void (*removepage)(struct page *); /* called when page gets removed from the inode */ ++}; ++ ++struct address_space { ++ struct list_head clean_pages; /* list of clean pages */ ++ struct list_head dirty_pages; /* list of dirty pages */ ++ struct list_head locked_pages; /* list of locked pages */ ++ unsigned long nrpages; /* number of total pages */ ++ struct address_space_operations *a_ops; /* methods */ ++ struct inode *host; /* owner: inode, block_device */ ++ struct vm_area_struct *i_mmap; /* list of private mappings */ ++ struct vm_area_struct *i_mmap_shared; /* list of shared mappings */ ++ spinlock_t i_shared_lock; /* and spinlock protecting it */ ++ int gfp_mask; /* how to allocate the pages */ ++}; ++ ++struct char_device { ++ struct list_head hash; ++ atomic_t count; ++ dev_t dev; ++ atomic_t openers; ++ struct semaphore sem; ++}; ++ ++struct block_device { ++ struct list_head bd_hash; ++ atomic_t bd_count; ++ struct inode * bd_inode; ++ dev_t bd_dev; /* not a kdev_t - it's a search key */ ++ int bd_openers; ++ const struct block_device_operations *bd_op; ++ struct semaphore bd_sem; /* open/close mutex */ ++ struct list_head bd_inodes; ++}; ++ ++struct inode { ++ struct list_head i_hash; ++ struct list_head i_list; ++ struct list_head i_dentry; ++ ++ struct list_head i_dirty_buffers; ++ struct list_head i_dirty_data_buffers; ++ ++ unsigned long i_ino; ++ atomic_t i_count; ++ kdev_t i_dev; ++ umode_t i_mode; ++ nlink_t i_nlink; ++ uid_t i_uid; ++ gid_t i_gid; ++ kdev_t i_rdev; ++ loff_t i_size; ++ time_t i_atime; ++ time_t i_mtime; ++ time_t i_ctime; ++ unsigned int i_blkbits; ++ unsigned long i_blksize; ++ unsigned long i_blocks; ++ unsigned long i_version; ++ unsigned short i_bytes; ++ struct semaphore i_sem; ++ struct rw_semaphore i_alloc_sem; ++ struct semaphore i_zombie; ++ struct inode_operations *i_op; ++ struct file_operations *i_fop; /* former ->i_op->default_file_ops */ ++ struct super_block *i_sb; ++ wait_queue_head_t i_wait; ++ struct file_lock *i_flock; ++ struct address_space *i_mapping; ++ struct address_space i_data; ++ struct dquot *i_dquot[MAXQUOTAS]; ++ /* These three should probably be a union */ ++ struct list_head i_devices; ++ struct pipe_inode_info *i_pipe; ++ struct block_device *i_bdev; ++ struct char_device *i_cdev; ++ ++ unsigned long i_dnotify_mask; /* Directory notify events */ ++ struct dnotify_struct *i_dnotify; /* for directory notifications */ ++ ++ unsigned long i_state; ++ ++ unsigned int i_flags; ++ unsigned char i_sock; ++ ++ atomic_t i_writecount; ++ unsigned int i_attr_flags; ++ __u32 i_generation; ++ union { ++ struct minix_inode_info minix_i; ++ struct ext2_inode_info ext2_i; ++ struct ext3_inode_info ext3_i; ++ struct hpfs_inode_info hpfs_i; ++ struct ntfs_inode_info ntfs_i; ++ struct msdos_inode_info msdos_i; ++ struct umsdos_inode_info umsdos_i; ++ struct iso_inode_info isofs_i; ++ struct nfs_inode_info nfs_i; ++ struct sysv_inode_info sysv_i; ++ struct affs_inode_info affs_i; ++ struct ufs_inode_info ufs_i; ++ struct efs_inode_info efs_i; ++ struct romfs_inode_info romfs_i; ++ struct shmem_inode_info shmem_i; ++ struct coda_inode_info coda_i; ++ struct smb_inode_info smbfs_i; ++ struct hfs_inode_info hfs_i; ++ struct adfs_inode_info adfs_i; ++ struct qnx4_inode_info qnx4_i; ++ struct reiserfs_inode_info reiserfs_i; ++ struct bfs_inode_info bfs_i; ++ struct udf_inode_info udf_i; ++ struct ncp_inode_info ncpfs_i; ++ struct proc_inode_info proc_i; ++ struct socket socket_i; ++ struct usbdev_inode_info usbdev_i; ++ struct jffs2_inode_info jffs2_i; ++ void *generic_ip; ++ } u; ++}; ++ ++static inline void inode_add_bytes(struct inode *inode, loff_t bytes) ++{ ++ inode->i_blocks += bytes >> 9; ++ bytes &= 511; ++ inode->i_bytes += bytes; ++ if (inode->i_bytes >= 512) { ++ inode->i_blocks++; ++ inode->i_bytes -= 512; ++ } ++} ++ ++static inline void inode_sub_bytes(struct inode *inode, loff_t bytes) ++{ ++ inode->i_blocks -= bytes >> 9; ++ bytes &= 511; ++ if (inode->i_bytes < bytes) { ++ inode->i_blocks--; ++ inode->i_bytes += 512; ++ } ++ inode->i_bytes -= bytes; ++} ++ ++static inline loff_t inode_get_bytes(struct inode *inode) ++{ ++ return (((loff_t)inode->i_blocks) << 9) + inode->i_bytes; ++} ++ ++static inline void inode_set_bytes(struct inode *inode, loff_t bytes) ++{ ++ inode->i_blocks = bytes >> 9; ++ inode->i_bytes = bytes & 511; ++} ++ ++struct fown_struct { ++ int pid; /* pid or -pgrp where SIGIO should be sent */ ++ uid_t uid, euid; /* uid/euid of process setting the owner */ ++ int signum; /* posix.1b rt signal to be delivered on IO */ ++}; ++ ++struct file { ++ struct list_head f_list; ++ struct dentry *f_dentry; ++ struct vfsmount *f_vfsmnt; ++ struct file_operations *f_op; ++ atomic_t f_count; ++ unsigned int f_flags; ++ mode_t f_mode; ++ loff_t f_pos; ++ unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin; ++ struct fown_struct f_owner; ++ unsigned int f_uid, f_gid; ++ int f_error; ++ ++ unsigned long f_version; ++ ++ /* needed for tty driver, and maybe others */ ++ void *private_data; ++ ++ /* preallocated helper kiobuf to speedup O_DIRECT */ ++ struct kiobuf *f_iobuf; ++ long f_iobuf_lock; ++}; ++extern spinlock_t files_lock; ++#define file_list_lock() spin_lock(&files_lock); ++#define file_list_unlock() spin_unlock(&files_lock); ++ ++#define get_file(x) atomic_inc(&(x)->f_count) ++#define file_count(x) atomic_read(&(x)->f_count) ++ ++extern int init_private_file(struct file *, struct dentry *, int); ++ ++#define MAX_NON_LFS ((1UL<<31) - 1) ++ ++/* Page cache limit. The filesystems should put that into their s_maxbytes ++ limits, otherwise bad things can happen in VM. */ ++#if BITS_PER_LONG==32 ++#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) ++#elif BITS_PER_LONG==64 ++#define MAX_LFS_FILESIZE 0x7fffffffffffffff ++#endif ++ ++#define FL_POSIX 1 ++#define FL_FLOCK 2 ++#define FL_BROKEN 4 /* broken flock() emulation */ ++#define FL_ACCESS 8 /* for processes suspended by mandatory locking */ ++#define FL_LOCKD 16 /* lock held by rpc.lockd */ ++#define FL_LEASE 32 /* lease held on this file */ ++ ++/* ++ * The POSIX file lock owner is determined by ++ * the "struct files_struct" in the thread group ++ * (or NULL for no owner - BSD locks). ++ * ++ * Lockd stuffs a "host" pointer into this. ++ */ ++typedef struct files_struct *fl_owner_t; ++ ++struct file_lock { ++ struct file_lock *fl_next; /* singly linked list for this inode */ ++ struct list_head fl_link; /* doubly linked list of all locks */ ++ struct list_head fl_block; /* circular list of blocked processes */ ++ fl_owner_t fl_owner; ++ unsigned int fl_pid; ++ wait_queue_head_t fl_wait; ++ struct file *fl_file; ++ unsigned char fl_flags; ++ unsigned char fl_type; ++ loff_t fl_start; ++ loff_t fl_end; ++ ++ void (*fl_notify)(struct file_lock *); /* unblock callback */ ++ void (*fl_insert)(struct file_lock *); /* lock insertion callback */ ++ void (*fl_remove)(struct file_lock *); /* lock removal callback */ ++ ++ struct fasync_struct * fl_fasync; /* for lease break notifications */ ++ unsigned long fl_break_time; /* for nonblocking lease breaks */ ++ ++ union { ++ struct nfs_lock_info nfs_fl; ++ } fl_u; ++}; ++ ++/* The following constant reflects the upper bound of the file/locking space */ ++#ifndef OFFSET_MAX ++#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1))) ++#define OFFSET_MAX INT_LIMIT(loff_t) ++#define OFFT_OFFSET_MAX INT_LIMIT(off_t) ++#endif ++ ++extern struct list_head file_lock_list; ++ ++#include ++ ++extern int fcntl_getlk(unsigned int, struct flock *); ++extern int fcntl_setlk(unsigned int, unsigned int, struct flock *); ++ ++extern int fcntl_getlk64(unsigned int, struct flock64 *); ++extern int fcntl_setlk64(unsigned int, unsigned int, struct flock64 *); ++ ++/* fs/locks.c */ ++extern void locks_init_lock(struct file_lock *); ++extern void locks_copy_lock(struct file_lock *, struct file_lock *); ++extern void locks_remove_posix(struct file *, fl_owner_t); ++extern void locks_remove_flock(struct file *); ++extern struct file_lock *posix_test_lock(struct file *, struct file_lock *); ++extern int posix_lock_file(struct file *, struct file_lock *, unsigned int); ++extern void posix_block_lock(struct file_lock *, struct file_lock *); ++extern void posix_unblock_lock(struct file_lock *); ++extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); ++extern int __get_lease(struct inode *inode, unsigned int flags); ++extern time_t lease_get_mtime(struct inode *); ++extern int lock_may_read(struct inode *, loff_t start, unsigned long count); ++extern int lock_may_write(struct inode *, loff_t start, unsigned long count); ++extern void steal_locks(fl_owner_t from); ++ ++struct fasync_struct { ++ int magic; ++ int fa_fd; ++ struct fasync_struct *fa_next; /* singly linked list */ ++ struct file *fa_file; ++}; ++ ++#define FASYNC_MAGIC 0x4601 ++ ++/* SMP safe fasync helpers: */ ++extern int fasync_helper(int, struct file *, int, struct fasync_struct **); ++/* can be called from interrupts */ ++extern void kill_fasync(struct fasync_struct **, int, int); ++/* only for net: no internal synchronization */ ++extern void __kill_fasync(struct fasync_struct *, int, int); ++ ++struct nameidata { ++ struct dentry *dentry; ++ struct vfsmount *mnt; ++ struct qstr last; ++ unsigned int flags; ++ int last_type; ++}; ++ ++/* ++ * Umount options ++ */ ++ ++#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ ++#define MNT_DETACH 0x00000002 /* Just detach from the tree */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++extern struct list_head super_blocks; ++extern spinlock_t sb_lock; ++ ++#define sb_entry(list) list_entry((list), struct super_block, s_list) ++#define S_BIAS (1<<30) ++struct super_block { ++ struct list_head s_list; /* Keep this first */ ++ kdev_t s_dev; ++ unsigned long s_blocksize; ++ unsigned char s_blocksize_bits; ++ unsigned char s_dirt; ++ unsigned long long s_maxbytes; /* Max file size */ ++ struct file_system_type *s_type; ++ struct super_operations *s_op; ++ struct dquot_operations *dq_op; ++ struct quotactl_ops *s_qcop; ++ unsigned long s_flags; ++ unsigned long s_magic; ++ struct dentry *s_root; ++ struct rw_semaphore s_umount; ++ struct semaphore s_lock; ++ int s_count; ++ atomic_t s_active; ++ ++ struct list_head s_dirty; /* dirty inodes */ ++ struct list_head s_locked_inodes;/* inodes being synced */ ++ struct list_head s_files; ++ ++ struct block_device *s_bdev; ++ struct list_head s_instances; ++ struct quota_info s_dquot; /* Diskquota specific options */ ++ ++ union { ++ struct minix_sb_info minix_sb; ++ struct ext2_sb_info ext2_sb; ++ struct ext3_sb_info ext3_sb; ++ struct hpfs_sb_info hpfs_sb; ++ struct ntfs_sb_info ntfs_sb; ++ struct msdos_sb_info msdos_sb; ++ struct isofs_sb_info isofs_sb; ++ struct nfs_sb_info nfs_sb; ++ struct sysv_sb_info sysv_sb; ++ struct affs_sb_info affs_sb; ++ struct ufs_sb_info ufs_sb; ++ struct efs_sb_info efs_sb; ++ struct shmem_sb_info shmem_sb; ++ struct romfs_sb_info romfs_sb; ++ struct smb_sb_info smbfs_sb; ++ struct hfs_sb_info hfs_sb; ++ struct adfs_sb_info adfs_sb; ++ struct qnx4_sb_info qnx4_sb; ++ struct reiserfs_sb_info reiserfs_sb; ++ struct bfs_sb_info bfs_sb; ++ struct udf_sb_info udf_sb; ++ struct ncp_sb_info ncpfs_sb; ++ struct usbdev_sb_info usbdevfs_sb; ++ struct jffs2_sb_info jffs2_sb; ++ struct cramfs_sb_info cramfs_sb; ++ void *generic_sbp; ++ } u; ++ /* ++ * The next field is for VFS *only*. No filesystems have any business ++ * even looking at it. You had been warned. ++ */ ++ struct semaphore s_vfs_rename_sem; /* Kludge */ ++ ++ /* The next field is used by knfsd when converting a (inode number based) ++ * file handle into a dentry. As it builds a path in the dcache tree from ++ * the bottom up, there may for a time be a subpath of dentrys which is not ++ * connected to the main tree. This semaphore ensure that there is only ever ++ * one such free path per filesystem. Note that unconnected files (or other ++ * non-directories) are allowed, but not unconnected diretories. ++ */ ++ struct semaphore s_nfsd_free_path_sem; ++}; ++ ++/* ++ * VFS helper functions.. ++ */ ++extern int vfs_create(struct inode *, struct dentry *, int); ++extern int vfs_mkdir(struct inode *, struct dentry *, int); ++extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); ++extern int vfs_symlink(struct inode *, struct dentry *, const char *); ++extern int vfs_link(struct dentry *, struct inode *, struct dentry *); ++extern int vfs_rmdir(struct inode *, struct dentry *); ++extern int vfs_unlink(struct inode *, struct dentry *); ++extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); ++ ++/* ++ * File types ++ */ ++#define DT_UNKNOWN 0 ++#define DT_FIFO 1 ++#define DT_CHR 2 ++#define DT_DIR 4 ++#define DT_BLK 6 ++#define DT_REG 8 ++#define DT_LNK 10 ++#define DT_SOCK 12 ++#define DT_WHT 14 ++ ++/* ++ * This is the "filldir" function type, used by readdir() to let ++ * the kernel specify what kind of dirent layout it wants to have. ++ * This allows the kernel to read directories into kernel space or ++ * to have different dirent layouts depending on the binary type. ++ */ ++typedef int (*filldir_t)(void *, const char *, int, loff_t, ino_t, unsigned); ++ ++struct block_device_operations { ++ int (*open) (struct inode *, struct file *); ++ int (*release) (struct inode *, struct file *); ++ int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); ++ int (*check_media_change) (kdev_t); ++ int (*revalidate) (kdev_t); ++ struct module *owner; ++}; ++ ++/* ++ * NOTE: ++ * read, write, poll, fsync, readv, writev can be called ++ * without the big kernel lock held in all filesystems. ++ */ ++struct file_operations { ++ struct module *owner; ++ loff_t (*llseek) (struct file *, loff_t, int); ++ ssize_t (*read) (struct file *, char *, size_t, loff_t *); ++ ssize_t (*write) (struct file *, const char *, size_t, loff_t *); ++ int (*readdir) (struct file *, void *, filldir_t); ++ unsigned int (*poll) (struct file *, struct poll_table_struct *); ++ int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); ++ int (*mmap) (struct file *, struct vm_area_struct *); ++ int (*open) (struct inode *, struct file *); ++ int (*flush) (struct file *); ++ int (*release) (struct inode *, struct file *); ++ int (*fsync) (struct file *, struct dentry *, int datasync); ++ int (*fasync) (int, struct file *, int); ++ int (*lock) (struct file *, int, struct file_lock *); ++ ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *); ++ ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *); ++ ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); ++ unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); ++}; ++ ++struct inode_operations { ++ int (*create) (struct inode *,struct dentry *,int); ++ struct dentry * (*lookup) (struct inode *,struct dentry *); ++ int (*link) (struct dentry *,struct inode *,struct dentry *); ++ int (*unlink) (struct inode *,struct dentry *); ++ int (*symlink) (struct inode *,struct dentry *,const char *); ++ int (*mkdir) (struct inode *,struct dentry *,int); ++ int (*rmdir) (struct inode *,struct dentry *); ++ int (*mknod) (struct inode *,struct dentry *,int,int); ++ int (*rename) (struct inode *, struct dentry *, ++ struct inode *, struct dentry *); ++ int (*readlink) (struct dentry *, char *,int); ++ int (*follow_link) (struct dentry *, struct nameidata *); ++ void (*truncate) (struct inode *); ++ int (*permission) (struct inode *, int); ++ int (*revalidate) (struct dentry *); ++ int (*setattr) (struct dentry *, struct iattr *); ++ int (*getattr) (struct dentry *, struct iattr *); ++ int (*setxattr) (struct dentry *, const char *, void *, size_t, int); ++ ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); ++ ssize_t (*listxattr) (struct dentry *, char *, size_t); ++ int (*removexattr) (struct dentry *, const char *); ++}; ++ ++struct seq_file; ++ ++/* ++ * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called ++ * without the big kernel lock held in all filesystems. ++ */ ++struct super_operations { ++ struct inode *(*alloc_inode)(struct super_block *sb); ++ void (*destroy_inode)(struct inode *); ++ ++ void (*read_inode) (struct inode *); ++ ++ /* reiserfs kludge. reiserfs needs 64 bits of information to ++ ** find an inode. We are using the read_inode2 call to get ++ ** that information. We don't like this, and are waiting on some ++ ** VFS changes for the real solution. ++ ** iget4 calls read_inode2, iff it is defined ++ */ ++ void (*read_inode2) (struct inode *, void *) ; ++ void (*dirty_inode) (struct inode *); ++ void (*write_inode) (struct inode *, int); ++ void (*put_inode) (struct inode *); ++ void (*delete_inode) (struct inode *); ++ void (*put_super) (struct super_block *); ++ void (*write_super) (struct super_block *); ++ int (*sync_fs) (struct super_block *); ++ void (*write_super_lockfs) (struct super_block *); ++ void (*unlockfs) (struct super_block *); ++ int (*statfs) (struct super_block *, struct statfs *); ++ int (*remount_fs) (struct super_block *, int *, char *); ++ void (*clear_inode) (struct inode *); ++ void (*umount_begin) (struct super_block *); ++ ++ /* Following are for knfsd to interact with "interesting" filesystems ++ * Currently just reiserfs, but possibly FAT and others later ++ * ++ * fh_to_dentry is given a filehandle fragement with length, and a type flag ++ * and must return a dentry for the referenced object or, if "parent" is ++ * set, a dentry for the parent of the object. ++ * If a dentry cannot be found, a "root" dentry should be created and ++ * flaged as DCACHE_NFSD_DISCONNECTED. nfsd_iget is an example implementation. ++ * ++ * dentry_to_fh is given a dentry and must generate the filesys specific ++ * part of the file handle. Available length is passed in *lenp and used ++ * length should be returned therein. ++ * If need_parent is set, then dentry_to_fh should encode sufficient information ++ * to find the (current) parent. ++ * dentry_to_fh should return a 1byte "type" which will be passed back in ++ * the fhtype arguement to fh_to_dentry. Type of 0 is reserved. ++ * If filesystem was exportable before the introduction of fh_to_dentry, ++ * types 1 and 2 should be used is that same way as the generic code. ++ * Type 255 means error. ++ * ++ * Lengths are in units of 4bytes, not bytes. ++ */ ++ struct dentry * (*fh_to_dentry)(struct super_block *sb, __u32 *fh, int len, int fhtype, int parent); ++ int (*dentry_to_fh)(struct dentry *, __u32 *fh, int *lenp, int need_parent); ++ int (*show_options)(struct seq_file *, struct vfsmount *); ++}; ++ ++/* Inode state bits.. */ ++#define I_DIRTY_SYNC 1 /* Not dirty enough for O_DATASYNC */ ++#define I_DIRTY_DATASYNC 2 /* Data-related inode changes pending */ ++#define I_DIRTY_PAGES 4 /* Data-related inode changes pending */ ++#define I_LOCK 8 ++#define I_FREEING 16 ++#define I_CLEAR 32 ++ ++#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) ++ ++extern void __mark_inode_dirty(struct inode *, int); ++static inline void mark_inode_dirty(struct inode *inode) ++{ ++ __mark_inode_dirty(inode, I_DIRTY); ++} ++ ++static inline void mark_inode_dirty_sync(struct inode *inode) ++{ ++ __mark_inode_dirty(inode, I_DIRTY_SYNC); ++} ++ ++static inline void mark_inode_dirty_pages(struct inode *inode) ++{ ++ __mark_inode_dirty(inode, I_DIRTY_PAGES); ++} ++ ++struct file_system_type { ++ const char *name; ++ int fs_flags; ++ struct super_block *(*read_super) (struct super_block *, void *, int); ++ struct module *owner; ++ struct file_system_type * next; ++ struct list_head fs_supers; ++}; ++ ++#define DECLARE_FSTYPE(var,type,read,flags) \ ++struct file_system_type var = { \ ++ name: type, \ ++ read_super: read, \ ++ fs_flags: flags, \ ++ owner: THIS_MODULE, \ ++} ++ ++#define DECLARE_FSTYPE_DEV(var,type,read) \ ++ DECLARE_FSTYPE(var,type,read,FS_REQUIRES_DEV) ++ ++/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ ++#define fops_get(fops) \ ++ (((fops) && (fops)->owner) \ ++ ? ( try_inc_mod_count((fops)->owner) ? (fops) : NULL ) \ ++ : (fops)) ++ ++#define fops_put(fops) \ ++do { \ ++ if ((fops) && (fops)->owner) \ ++ __MOD_DEC_USE_COUNT((fops)->owner); \ ++} while(0) ++ ++extern int register_filesystem(struct file_system_type *); ++extern int unregister_filesystem(struct file_system_type *); ++extern struct vfsmount *kern_mount(struct file_system_type *); ++extern int may_umount(struct vfsmount *); ++extern long do_mount(char *, char *, char *, unsigned long, void *); ++ ++#define kern_umount mntput ++ ++extern int vfs_statfs(struct super_block *, struct statfs *); ++ ++/* Return value for VFS lock functions - tells locks.c to lock conventionally ++ * REALLY kosha for root NFS and nfs_lock ++ */ ++#define LOCK_USE_CLNT 1 ++ ++#define FLOCK_VERIFY_READ 1 ++#define FLOCK_VERIFY_WRITE 2 ++ ++extern int locks_mandatory_locked(struct inode *); ++extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); ++ ++/* ++ * Candidates for mandatory locking have the setgid bit set ++ * but no group execute bit - an otherwise meaningless combination. ++ */ ++#define MANDATORY_LOCK(inode) \ ++ (IS_MANDLOCK(inode) && ((inode)->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) ++ ++static inline int locks_verify_locked(struct inode *inode) ++{ ++ if (MANDATORY_LOCK(inode)) ++ return locks_mandatory_locked(inode); ++ return 0; ++} ++ ++static inline int locks_verify_area(int read_write, struct inode *inode, ++ struct file *filp, loff_t offset, ++ size_t count) ++{ ++ if (inode->i_flock && MANDATORY_LOCK(inode)) ++ return locks_mandatory_area(read_write, inode, filp, offset, count); ++ return 0; ++} ++ ++static inline int locks_verify_truncate(struct inode *inode, ++ struct file *filp, ++ loff_t size) ++{ ++ if (inode->i_flock && MANDATORY_LOCK(inode)) ++ return locks_mandatory_area( ++ FLOCK_VERIFY_WRITE, inode, filp, ++ size < inode->i_size ? size : inode->i_size, ++ (size < inode->i_size ? inode->i_size - size ++ : size - inode->i_size) ++ ); ++ return 0; ++} ++ ++static inline int get_lease(struct inode *inode, unsigned int mode) ++{ ++ if (inode->i_flock) ++ return __get_lease(inode, mode); ++ return 0; ++} ++ ++/* fs/open.c */ ++ ++asmlinkage long sys_open(const char *, int, int); ++asmlinkage long sys_close(unsigned int); /* yes, it's really unsigned */ ++extern int do_truncate(struct dentry *, loff_t start); ++ ++extern struct file *filp_open(const char *, int, int); ++extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); ++extern int filp_close(struct file *, fl_owner_t id); ++extern char * getname(const char *); ++ ++/* fs/dcache.c */ ++extern void vfs_caches_init(unsigned long); ++ ++#define __getname() kmem_cache_alloc(names_cachep, SLAB_KERNEL) ++#define putname(name) kmem_cache_free(names_cachep, (void *)(name)) ++ ++enum {BDEV_FILE, BDEV_SWAP, BDEV_FS, BDEV_RAW}; ++extern int register_blkdev(unsigned int, const char *, struct block_device_operations *); ++extern int unregister_blkdev(unsigned int, const char *); ++extern struct block_device *bdget(dev_t); ++extern int bd_acquire(struct inode *inode); ++extern void bd_forget(struct inode *inode); ++extern void bdput(struct block_device *); ++extern struct char_device *cdget(dev_t); ++extern void cdput(struct char_device *); ++extern int blkdev_open(struct inode *, struct file *); ++extern int blkdev_close(struct inode *, struct file *); ++extern struct file_operations def_blk_fops; ++extern struct address_space_operations def_blk_aops; ++extern struct file_operations def_fifo_fops; ++extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); ++extern int blkdev_get(struct block_device *, mode_t, unsigned, int); ++extern int blkdev_put(struct block_device *, int); ++ ++/* fs/devices.c */ ++extern const struct block_device_operations *get_blkfops(unsigned int); ++extern int register_chrdev(unsigned int, const char *, struct file_operations *); ++extern int unregister_chrdev(unsigned int, const char *); ++extern int chrdev_open(struct inode *, struct file *); ++extern const char * bdevname(kdev_t); ++extern const char * cdevname(kdev_t); ++extern const char * kdevname(kdev_t); ++extern void init_special_inode(struct inode *, umode_t, int); ++ ++/* Invalid inode operations -- fs/bad_inode.c */ ++extern void make_bad_inode(struct inode *); ++extern int is_bad_inode(struct inode *); ++ ++extern struct file_operations read_fifo_fops; ++extern struct file_operations write_fifo_fops; ++extern struct file_operations rdwr_fifo_fops; ++extern struct file_operations read_pipe_fops; ++extern struct file_operations write_pipe_fops; ++extern struct file_operations rdwr_pipe_fops; ++ ++extern int fs_may_remount_ro(struct super_block *); ++ ++extern int FASTCALL(try_to_free_buffers(struct page *, unsigned int)); ++extern void refile_buffer(struct buffer_head * buf); ++extern void create_empty_buffers(struct page *, kdev_t, unsigned long); ++extern void end_buffer_io_sync(struct buffer_head *bh, int uptodate); ++ ++/* reiserfs_writepage needs this */ ++extern void set_buffer_async_io(struct buffer_head *bh) ; ++ ++#define BUF_CLEAN 0 ++#define BUF_LOCKED 1 /* Buffers scheduled for write */ ++#define BUF_DIRTY 2 /* Dirty buffers, not yet scheduled for write */ ++#define NR_LIST 3 ++ ++static inline void get_bh(struct buffer_head * bh) ++{ ++ atomic_inc(&(bh)->b_count); ++} ++ ++static inline void put_bh(struct buffer_head *bh) ++{ ++ smp_mb__before_atomic_dec(); ++ atomic_dec(&bh->b_count); ++} ++ ++/* ++ * This is called by bh->b_end_io() handlers when I/O has completed. ++ */ ++static inline void mark_buffer_uptodate(struct buffer_head * bh, int on) ++{ ++ if (on) ++ set_bit(BH_Uptodate, &bh->b_state); ++ else ++ clear_bit(BH_Uptodate, &bh->b_state); ++} ++ ++#define atomic_set_buffer_clean(bh) test_and_clear_bit(BH_Dirty, &(bh)->b_state) ++ ++static inline void __mark_buffer_clean(struct buffer_head *bh) ++{ ++ refile_buffer(bh); ++} ++ ++static inline void mark_buffer_clean(struct buffer_head * bh) ++{ ++ if (atomic_set_buffer_clean(bh)) ++ __mark_buffer_clean(bh); ++} ++ ++extern void FASTCALL(__mark_dirty(struct buffer_head *bh)); ++extern void FASTCALL(__mark_buffer_dirty(struct buffer_head *bh)); ++extern void FASTCALL(mark_buffer_dirty(struct buffer_head *bh)); ++ ++extern void FASTCALL(buffer_insert_list(struct buffer_head *, struct list_head *)); ++ ++static inline void buffer_insert_inode_queue(struct buffer_head *bh, struct inode *inode) ++{ ++ buffer_insert_list(bh, &inode->i_dirty_buffers); ++} ++ ++static inline void buffer_insert_inode_data_queue(struct buffer_head *bh, struct inode *inode) ++{ ++ buffer_insert_list(bh, &inode->i_dirty_data_buffers); ++} ++ ++static inline int atomic_set_buffer_dirty(struct buffer_head *bh) ++{ ++ return test_and_set_bit(BH_Dirty, &bh->b_state); ++} ++ ++static inline void mark_buffer_async(struct buffer_head * bh, int on) ++{ ++ if (on) ++ set_bit(BH_Async, &bh->b_state); ++ else ++ clear_bit(BH_Async, &bh->b_state); ++} ++ ++static inline void set_buffer_attached(struct buffer_head *bh) ++{ ++ set_bit(BH_Attached, &bh->b_state); ++} ++ ++static inline void clear_buffer_attached(struct buffer_head *bh) ++{ ++ clear_bit(BH_Attached, &bh->b_state); ++} ++ ++static inline int buffer_attached(struct buffer_head *bh) ++{ ++ return test_bit(BH_Attached, &bh->b_state); ++} ++ ++/* ++ * If an error happens during the make_request, this function ++ * has to be recalled. It marks the buffer as clean and not ++ * uptodate, and it notifys the upper layer about the end ++ * of the I/O. ++ */ ++static inline void buffer_IO_error(struct buffer_head * bh) ++{ ++ mark_buffer_clean(bh); ++ /* ++ * b_end_io has to clear the BH_Uptodate bitflag in the error case! ++ */ ++ bh->b_end_io(bh, 0); ++} ++ ++static inline void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) ++{ ++ mark_buffer_dirty(bh); ++ buffer_insert_inode_queue(bh, inode); ++} ++ ++extern void set_buffer_flushtime(struct buffer_head *); ++extern void balance_dirty(void); ++extern int check_disk_change(kdev_t); ++extern int invalidate_inodes(struct super_block *); ++extern int invalidate_device(kdev_t, int); ++extern void invalidate_inode_pages(struct inode *); ++extern void invalidate_inode_pages2(struct address_space *); ++extern void invalidate_inode_buffers(struct inode *); ++#define invalidate_buffers(dev) __invalidate_buffers((dev), 0) ++#define destroy_buffers(dev) __invalidate_buffers((dev), 1) ++extern void invalidate_bdev(struct block_device *, int); ++extern void __invalidate_buffers(kdev_t dev, int); ++extern void sync_inodes(kdev_t); ++extern void sync_unlocked_inodes(void); ++extern void write_inode_now(struct inode *, int); ++extern int sync_buffers(kdev_t, int); ++extern void sync_dev(kdev_t); ++extern int fsync_dev(kdev_t); ++extern int fsync_super(struct super_block *); ++extern int fsync_no_super(kdev_t); ++extern void sync_inodes_sb(struct super_block *); ++extern int fsync_buffers_list(struct list_head *); ++static inline int fsync_inode_buffers(struct inode *inode) ++{ ++ return fsync_buffers_list(&inode->i_dirty_buffers); ++} ++static inline int fsync_inode_data_buffers(struct inode *inode) ++{ ++ return fsync_buffers_list(&inode->i_dirty_data_buffers); ++} ++extern int inode_has_buffers(struct inode *); ++extern int do_fdatasync(struct file *); ++extern int filemap_fdatasync(struct address_space *); ++extern int filemap_fdatawait(struct address_space *); ++extern void sync_supers(kdev_t dev, int wait); ++extern int bmap(struct inode *, int); ++extern int notify_change(struct dentry *, struct iattr *); ++extern int permission(struct inode *, int); ++extern int vfs_permission(struct inode *, int); ++extern int get_write_access(struct inode *); ++extern int deny_write_access(struct file *); ++static inline void put_write_access(struct inode * inode) ++{ ++ atomic_dec(&inode->i_writecount); ++} ++static inline void allow_write_access(struct file *file) ++{ ++ if (file) ++ atomic_inc(&file->f_dentry->d_inode->i_writecount); ++} ++extern int do_pipe(int *); ++ ++extern int open_namei(const char *, int, int, struct nameidata *); ++ ++extern int kernel_read(struct file *, unsigned long, char *, unsigned long); ++extern struct file * open_exec(const char *); ++ ++/* fs/dcache.c -- generic fs support functions */ ++extern int is_subdir(struct dentry *, struct dentry *); ++extern ino_t find_inode_number(struct dentry *, struct qstr *); ++ ++/* ++ * Kernel pointers have redundant information, so we can use a ++ * scheme where we can return either an error code or a dentry ++ * pointer with the same return value. ++ * ++ * This should be a per-architecture thing, to allow different ++ * error and pointer decisions. ++ */ ++static inline void *ERR_PTR(long error) ++{ ++ return (void *) error; ++} ++ ++static inline long PTR_ERR(const void *ptr) ++{ ++ return (long) ptr; ++} ++ ++static inline long IS_ERR(const void *ptr) ++{ ++ return (unsigned long)ptr > (unsigned long)-1000L; ++} ++ ++/* ++ * The bitmask for a lookup event: ++ * - follow links at the end ++ * - require a directory ++ * - ending slashes ok even for nonexistent files ++ * - internal "there are more path compnents" flag ++ */ ++#define LOOKUP_FOLLOW (1) ++#define LOOKUP_DIRECTORY (2) ++#define LOOKUP_CONTINUE (4) ++#define LOOKUP_POSITIVE (8) ++#define LOOKUP_PARENT (16) ++#define LOOKUP_NOALT (32) ++/* ++ * Type of the last component on LOOKUP_PARENT ++ */ ++enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; ++ ++/* ++ * "descriptor" for what we're up to with a read for sendfile(). ++ * This allows us to use the same read code yet ++ * have multiple different users of the data that ++ * we read from a file. ++ * ++ * The simplest case just copies the data to user ++ * mode. ++ */ ++typedef struct { ++ size_t written; ++ size_t count; ++ char * buf; ++ int error; ++} read_descriptor_t; ++ ++typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); ++ ++/* needed for stackable file system support */ ++extern loff_t default_llseek(struct file *file, loff_t offset, int origin); ++ ++extern int FASTCALL(__user_walk(const char *, unsigned, struct nameidata *)); ++extern int FASTCALL(path_init(const char *, unsigned, struct nameidata *)); ++extern int FASTCALL(path_walk(const char *, struct nameidata *)); ++extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); ++extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); ++extern void path_release(struct nameidata *); ++extern int follow_down(struct vfsmount **, struct dentry **); ++extern int follow_up(struct vfsmount **, struct dentry **); ++extern struct dentry * lookup_one_len(const char *, struct dentry *, int); ++extern struct dentry * lookup_hash(struct qstr *, struct dentry *); ++#define user_path_walk(name,nd) __user_walk(name, LOOKUP_FOLLOW|LOOKUP_POSITIVE, nd) ++#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd) ++ ++extern void inode_init_once(struct inode *); ++extern void iput(struct inode *); ++extern void force_delete(struct inode *); ++extern struct inode * igrab(struct inode *); ++extern ino_t iunique(struct super_block *, ino_t); ++ ++typedef int (*find_inode_t)(struct inode *, unsigned long, void *); ++extern struct inode * iget4(struct super_block *, unsigned long, find_inode_t, void *); ++static inline struct inode *iget(struct super_block *sb, unsigned long ino) ++{ ++ return iget4(sb, ino, NULL, NULL); ++} ++ ++extern void clear_inode(struct inode *); ++extern struct inode *new_inode(struct super_block *sb); ++extern void remove_suid(struct inode *inode); ++ ++extern void insert_inode_hash(struct inode *); ++extern void remove_inode_hash(struct inode *); ++extern struct file * get_empty_filp(void); ++extern void file_move(struct file *f, struct list_head *list); ++extern struct buffer_head * get_hash_table(kdev_t, int, int); ++extern struct buffer_head * getblk(kdev_t, int, int); ++extern void ll_rw_block(int, int, struct buffer_head * bh[]); ++extern void submit_bh(int, struct buffer_head *); ++extern int is_read_only(kdev_t); ++extern void __brelse(struct buffer_head *); ++static inline void brelse(struct buffer_head *buf) ++{ ++ if (buf) ++ __brelse(buf); ++} ++extern void __bforget(struct buffer_head *); ++static inline void bforget(struct buffer_head *buf) ++{ ++ if (buf) ++ __bforget(buf); ++} ++extern int set_blocksize(kdev_t, int); ++extern int sb_set_blocksize(struct super_block *, int); ++extern int sb_min_blocksize(struct super_block *, int); ++extern struct buffer_head * bread(kdev_t, int, int); ++static inline struct buffer_head * sb_bread(struct super_block *sb, int block) ++{ ++ return bread(sb->s_dev, block, sb->s_blocksize); ++} ++static inline struct buffer_head * sb_getblk(struct super_block *sb, int block) ++{ ++ return getblk(sb->s_dev, block, sb->s_blocksize); ++} ++static inline struct buffer_head * sb_get_hash_table(struct super_block *sb, int block) ++{ ++ return get_hash_table(sb->s_dev, block, sb->s_blocksize); ++} ++extern void wakeup_bdflush(void); ++extern void put_unused_buffer_head(struct buffer_head * bh); ++extern struct buffer_head * get_unused_buffer_head(int async); ++ ++extern int brw_page(int, struct page *, kdev_t, int [], int); ++ ++typedef int (get_block_t)(struct inode*,long,struct buffer_head*,int); ++ ++/* Generic buffer handling for block filesystems.. */ ++extern int try_to_release_page(struct page * page, int gfp_mask); ++extern int discard_bh_page(struct page *, unsigned long, int); ++#define block_flushpage(page, offset) discard_bh_page(page, offset, 1) ++#define block_invalidate_page(page) discard_bh_page(page, 0, 0) ++extern int block_symlink(struct inode *, const char *, int); ++extern int block_write_full_page(struct page*, get_block_t*); ++extern int block_read_full_page(struct page*, get_block_t*); ++extern int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); ++extern int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, ++ unsigned long *); ++extern int generic_cont_expand(struct inode *inode, loff_t size) ; ++extern int block_commit_write(struct page *page, unsigned from, unsigned to); ++extern int block_sync_page(struct page *); ++ ++int generic_block_bmap(struct address_space *, long, get_block_t *); ++int generic_commit_write(struct file *, struct page *, unsigned, unsigned); ++int block_truncate_page(struct address_space *, loff_t, get_block_t *); ++extern int generic_direct_IO(int, struct inode *, struct kiobuf *, unsigned long, int, get_block_t *); ++extern int waitfor_one_page(struct page *); ++extern int writeout_one_page(struct page *); ++ ++extern int generic_file_mmap(struct file *, struct vm_area_struct *); ++extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); ++extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *); ++extern int precheck_file_write(struct file *, struct inode *, size_t *, loff_t *); ++extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *); ++extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t); ++extern loff_t no_llseek(struct file *file, loff_t offset, int origin); ++extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); ++extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); ++extern int generic_file_open(struct inode * inode, struct file * filp); ++ ++extern struct file_operations generic_ro_fops; ++ ++extern int vfs_readlink(struct dentry *, char *, int, const char *); ++extern int vfs_follow_link(struct nameidata *, const char *); ++extern int page_readlink(struct dentry *, char *, int); ++extern int page_follow_link(struct dentry *, struct nameidata *); ++extern struct inode_operations page_symlink_inode_operations; ++ ++extern int vfs_readdir(struct file *, filldir_t, void *); ++extern int dcache_dir_open(struct inode *, struct file *); ++extern int dcache_dir_close(struct inode *, struct file *); ++extern loff_t dcache_dir_lseek(struct file *, loff_t, int); ++extern int dcache_dir_fsync(struct file *, struct dentry *, int); ++extern int dcache_readdir(struct file *, void *, filldir_t); ++extern struct file_operations dcache_dir_ops; ++ ++extern struct file_system_type *get_fs_type(const char *name); ++extern struct super_block *get_super(kdev_t); ++extern void drop_super(struct super_block *sb); ++static inline int is_mounted(kdev_t dev) ++{ ++ struct super_block *sb = get_super(dev); ++ if (sb) { ++ drop_super(sb); ++ return 1; ++ } ++ return 0; ++} ++unsigned long generate_cluster(kdev_t, int b[], int); ++unsigned long generate_cluster_swab32(kdev_t, int b[], int); ++extern kdev_t ROOT_DEV; ++extern char root_device_name[]; ++ ++ ++extern void show_buffers(void); ++ ++#ifdef CONFIG_BLK_DEV_INITRD ++extern unsigned int real_root_dev; ++#endif ++ ++extern ssize_t char_read(struct file *, char *, size_t, loff_t *); ++extern ssize_t block_read(struct file *, char *, size_t, loff_t *); ++extern int read_ahead[]; ++ ++extern ssize_t char_write(struct file *, const char *, size_t, loff_t *); ++extern ssize_t block_write(struct file *, const char *, size_t, loff_t *); ++ ++extern int file_fsync(struct file *, struct dentry *, int); ++extern int generic_buffer_fdatasync(struct inode *inode, unsigned long start_idx, unsigned long end_idx); ++extern int generic_osync_inode(struct inode *, int); ++#define OSYNC_METADATA (1<<0) ++#define OSYNC_DATA (1<<1) ++#define OSYNC_INODE (1<<2) ++ ++extern int inode_change_ok(struct inode *, struct iattr *); ++extern int inode_setattr(struct inode *, struct iattr *); ++ ++/* kernel/fork.c */ ++extern int unshare_files(void); ++ ++/* ++ * Common dentry functions for inclusion in the VFS ++ * or in other stackable file systems. Some of these ++ * functions were in linux/fs/ C (VFS) files. ++ * ++ */ ++ ++/* ++ * Locking the parent is needed to: ++ * - serialize directory operations ++ * - make sure the parent doesn't change from ++ * under us in the middle of an operation. ++ * ++ * NOTE! Right now we'd rather use a "struct inode" ++ * for this, but as I expect things to move toward ++ * using dentries instead for most things it is ++ * probably better to start with the conceptually ++ * better interface of relying on a path of dentries. ++ */ ++static inline struct dentry *lock_parent(struct dentry *dentry) ++{ ++ struct dentry *dir = dget(dentry->d_parent); ++ ++ down(&dir->d_inode->i_sem); ++ return dir; ++} ++ ++static inline struct dentry *get_parent(struct dentry *dentry) ++{ ++ return dget(dentry->d_parent); ++} ++ ++static inline void unlock_dir(struct dentry *dir) ++{ ++ up(&dir->d_inode->i_sem); ++ dput(dir); ++} ++ ++/* ++ * Whee.. Deadlock country. Happily there are only two VFS ++ * operations that does this.. ++ */ ++static inline void double_down(struct semaphore *s1, struct semaphore *s2) ++{ ++ if (s1 != s2) { ++ if ((unsigned long) s1 < (unsigned long) s2) { ++ struct semaphore *tmp = s2; ++ s2 = s1; s1 = tmp; ++ } ++ down(s1); ++ } ++ down(s2); ++} ++ ++/* ++ * Ewwwwwwww... _triple_ lock. We are guaranteed that the 3rd argument is ++ * not equal to 1st and not equal to 2nd - the first case (target is parent of ++ * source) would be already caught, the second is plain impossible (target is ++ * its own parent and that case would be caught even earlier). Very messy. ++ * I _think_ that it works, but no warranties - please, look it through. ++ * Pox on bloody lusers who mandated overwriting rename() for directories... ++ */ ++ ++static inline void triple_down(struct semaphore *s1, ++ struct semaphore *s2, ++ struct semaphore *s3) ++{ ++ if (s1 != s2) { ++ if ((unsigned long) s1 < (unsigned long) s2) { ++ if ((unsigned long) s1 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s1; s1 = tmp; ++ } ++ if ((unsigned long) s1 < (unsigned long) s2) { ++ struct semaphore *tmp = s2; ++ s2 = s1; s1 = tmp; ++ } ++ } else { ++ if ((unsigned long) s1 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s1; s1 = tmp; ++ } ++ if ((unsigned long) s2 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s2; s2 = tmp; ++ } ++ } ++ down(s1); ++ } else if ((unsigned long) s2 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s2; s2 = tmp; ++ } ++ down(s2); ++ down(s3); ++} ++ ++static inline void double_up(struct semaphore *s1, struct semaphore *s2) ++{ ++ up(s1); ++ if (s1 != s2) ++ up(s2); ++} ++ ++static inline void triple_up(struct semaphore *s1, ++ struct semaphore *s2, ++ struct semaphore *s3) ++{ ++ up(s1); ++ if (s1 != s2) ++ up(s2); ++ up(s3); ++} ++ ++static inline void double_lock(struct dentry *d1, struct dentry *d2) ++{ ++ double_down(&d1->d_inode->i_sem, &d2->d_inode->i_sem); ++} ++ ++static inline void double_unlock(struct dentry *d1, struct dentry *d2) ++{ ++ double_up(&d1->d_inode->i_sem,&d2->d_inode->i_sem); ++ dput(d1); ++ dput(d2); ++} ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _LINUX_FS_H */ +diff -Nur ./kernel-headers/linux/genhd.h ./kernel-headers/linux/genhd.h +--- ./kernel-headers/linux/genhd.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/genhd.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,318 @@ ++#ifndef _LINUX_GENHD_H ++#define _LINUX_GENHD_H ++ ++/* ++ * genhd.h Copyright (C) 1992 Drew Eckhardt ++ * Generic hard disk header file by ++ * Drew Eckhardt ++ * ++ * ++ */ ++ ++#include ++#include ++#include ++ ++enum { ++/* These three have identical behaviour; use the second one if DOS fdisk gets ++ confused about extended/logical partitions starting past cylinder 1023. */ ++ DOS_EXTENDED_PARTITION = 5, ++ LINUX_EXTENDED_PARTITION = 0x85, ++ WIN98_EXTENDED_PARTITION = 0x0f, ++ ++ LINUX_SWAP_PARTITION = 0x82, ++ LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ ++ ++ SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, ++ ++ DM6_PARTITION = 0x54, /* has DDO: use xlated geom & offset */ ++ EZD_PARTITION = 0x55, /* EZ-DRIVE */ ++ DM6_AUX1PARTITION = 0x51, /* no DDO: use xlated geom */ ++ DM6_AUX3PARTITION = 0x53, /* no DDO: use xlated geom */ ++ ++ FREEBSD_PARTITION = 0xa5, /* FreeBSD Partition ID */ ++ OPENBSD_PARTITION = 0xa6, /* OpenBSD Partition ID */ ++ NETBSD_PARTITION = 0xa9, /* NetBSD Partition ID */ ++ BSDI_PARTITION = 0xb7, /* BSDI Partition ID */ ++/* Ours is not to wonder why.. */ ++ BSD_PARTITION = FREEBSD_PARTITION, ++ MINIX_PARTITION = 0x81, /* Minix Partition ID */ ++ PLAN9_PARTITION = 0x39, /* Plan 9 Partition ID */ ++ UNIXWARE_PARTITION = 0x63, /* Partition ID, same as */ ++ /* GNU_HURD and SCO Unix */ ++}; ++ ++struct partition { ++ unsigned char boot_ind; /* 0x80 - active */ ++ unsigned char head; /* starting head */ ++ unsigned char sector; /* starting sector */ ++ unsigned char cyl; /* starting cylinder */ ++ unsigned char sys_ind; /* What partition type */ ++ unsigned char end_head; /* end head */ ++ unsigned char end_sector; /* end sector */ ++ unsigned char end_cyl; /* end cylinder */ ++ unsigned int start_sect; /* starting sector counting from 0 */ ++ unsigned int nr_sects; /* nr of sectors in partition */ ++} __attribute__((packed)); ++ ++#ifdef __KERNEL__ ++# include ++ ++struct hd_struct { ++ unsigned long start_sect; ++ unsigned long nr_sects; ++ devfs_handle_t de; /* primary (master) devfs entry */ ++#ifdef CONFIG_DEVFS_FS ++ int number; ++#endif /* CONFIG_DEVFS_FS */ ++#ifdef CONFIG_BLK_STATS ++ /* Performance stats: */ ++ unsigned int ios_in_flight; ++ unsigned int io_ticks; ++ unsigned int last_idle_time; ++ unsigned int last_queue_change; ++ unsigned int aveq; ++ ++ unsigned int rd_ios; ++ unsigned int rd_merges; ++ unsigned int rd_ticks; ++ unsigned int rd_sectors; ++ unsigned int wr_ios; ++ unsigned int wr_merges; ++ unsigned int wr_ticks; ++ unsigned int wr_sectors; ++#endif /* CONFIG_BLK_STATS */ ++}; ++ ++#define GENHD_FL_REMOVABLE 1 ++ ++struct gendisk { ++ int major; /* major number of driver */ ++ const char *major_name; /* name of major driver */ ++ int minor_shift; /* number of times minor is shifted to ++ get real minor */ ++ int max_p; /* maximum partitions per device */ ++ ++ struct hd_struct *part; /* [indexed by minor] */ ++ int *sizes; /* [idem], device size in blocks */ ++ int nr_real; /* number of real devices */ ++ ++ void *real_devices; /* internal use */ ++ struct gendisk *next; ++ struct block_device_operations *fops; ++ ++ devfs_handle_t *de_arr; /* one per physical disc */ ++ char *flags; /* one per physical disc */ ++}; ++ ++/* drivers/block/genhd.c */ ++extern struct gendisk *gendisk_head; ++ ++extern void add_gendisk(struct gendisk *gp); ++extern void del_gendisk(struct gendisk *gp); ++extern struct gendisk *get_gendisk(kdev_t dev); ++extern int walk_gendisk(int (*walk)(struct gendisk *, void *), void *); ++ ++#endif /* __KERNEL__ */ ++ ++#ifdef CONFIG_SOLARIS_X86_PARTITION ++ ++#define SOLARIS_X86_NUMSLICE 8 ++#define SOLARIS_X86_VTOC_SANE (0x600DDEEEUL) ++ ++struct solaris_x86_slice { ++ ushort s_tag; /* ID tag of partition */ ++ ushort s_flag; /* permission flags */ ++ unsigned int s_start; /* start sector no of partition */ ++ unsigned int s_size; /* # of blocks in partition */ ++}; ++ ++struct solaris_x86_vtoc { ++ unsigned int v_bootinfo[3]; /* info needed by mboot (unsupported) */ ++ unsigned int v_sanity; /* to verify vtoc sanity */ ++ unsigned int v_version; /* layout version */ ++ char v_volume[8]; /* volume name */ ++ ushort v_sectorsz; /* sector size in bytes */ ++ ushort v_nparts; /* number of partitions */ ++ unsigned int v_reserved[10]; /* free space */ ++ struct solaris_x86_slice ++ v_slice[SOLARIS_X86_NUMSLICE]; /* slice headers */ ++ unsigned int timestamp[SOLARIS_X86_NUMSLICE]; /* timestamp (unsupported) */ ++ char v_asciilabel[128]; /* for compatibility */ ++}; ++ ++#endif /* CONFIG_SOLARIS_X86_PARTITION */ ++ ++#ifdef CONFIG_BSD_DISKLABEL ++/* ++ * BSD disklabel support by Yossi Gottlieb ++ * updated by Marc Espie ++ */ ++ ++/* check against BSD src/sys/sys/disklabel.h for consistency */ ++ ++#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */ ++#define BSD_MAXPARTITIONS 8 ++#define OPENBSD_MAXPARTITIONS 16 ++#define BSD_FS_UNUSED 0 /* disklabel unused partition entry ID */ ++struct bsd_disklabel { ++ __u32 d_magic; /* the magic number */ ++ __s16 d_type; /* drive type */ ++ __s16 d_subtype; /* controller/d_type specific */ ++ char d_typename[16]; /* type name, e.g. "eagle" */ ++ char d_packname[16]; /* pack identifier */ ++ __u32 d_secsize; /* # of bytes per sector */ ++ __u32 d_nsectors; /* # of data sectors per track */ ++ __u32 d_ntracks; /* # of tracks per cylinder */ ++ __u32 d_ncylinders; /* # of data cylinders per unit */ ++ __u32 d_secpercyl; /* # of data sectors per cylinder */ ++ __u32 d_secperunit; /* # of data sectors per unit */ ++ __u16 d_sparespertrack; /* # of spare sectors per track */ ++ __u16 d_sparespercyl; /* # of spare sectors per cylinder */ ++ __u32 d_acylinders; /* # of alt. cylinders per unit */ ++ __u16 d_rpm; /* rotational speed */ ++ __u16 d_interleave; /* hardware sector interleave */ ++ __u16 d_trackskew; /* sector 0 skew, per track */ ++ __u16 d_cylskew; /* sector 0 skew, per cylinder */ ++ __u32 d_headswitch; /* head switch time, usec */ ++ __u32 d_trkseek; /* track-to-track seek, usec */ ++ __u32 d_flags; /* generic flags */ ++#define NDDATA 5 ++ __u32 d_drivedata[NDDATA]; /* drive-type specific information */ ++#define NSPARE 5 ++ __u32 d_spare[NSPARE]; /* reserved for future use */ ++ __u32 d_magic2; /* the magic number (again) */ ++ __u16 d_checksum; /* xor of data incl. partitions */ ++ ++ /* filesystem and partition information: */ ++ __u16 d_npartitions; /* number of partitions in following */ ++ __u32 d_bbsize; /* size of boot area at sn0, bytes */ ++ __u32 d_sbsize; /* max size of fs superblock, bytes */ ++ struct bsd_partition { /* the partition table */ ++ __u32 p_size; /* number of sectors in partition */ ++ __u32 p_offset; /* starting sector */ ++ __u32 p_fsize; /* filesystem basic fragment size */ ++ __u8 p_fstype; /* filesystem type, see below */ ++ __u8 p_frag; /* filesystem fragments per block */ ++ __u16 p_cpg; /* filesystem cylinders per group */ ++ } d_partitions[BSD_MAXPARTITIONS]; /* actually may be more */ ++}; ++ ++#endif /* CONFIG_BSD_DISKLABEL */ ++ ++#ifdef CONFIG_UNIXWARE_DISKLABEL ++/* ++ * Unixware slices support by Andrzej Krzysztofowicz ++ * and Krzysztof G. Baranowski ++ */ ++ ++#define UNIXWARE_DISKMAGIC (0xCA5E600DUL) /* The disk magic number */ ++#define UNIXWARE_DISKMAGIC2 (0x600DDEEEUL) /* The slice table magic nr */ ++#define UNIXWARE_NUMSLICE 16 ++#define UNIXWARE_FS_UNUSED 0 /* Unused slice entry ID */ ++ ++struct unixware_slice { ++ __u16 s_label; /* label */ ++ __u16 s_flags; /* permission flags */ ++ __u32 start_sect; /* starting sector */ ++ __u32 nr_sects; /* number of sectors in slice */ ++}; ++ ++struct unixware_disklabel { ++ __u32 d_type; /* drive type */ ++ __u32 d_magic; /* the magic number */ ++ __u32 d_version; /* version number */ ++ char d_serial[12]; /* serial number of the device */ ++ __u32 d_ncylinders; /* # of data cylinders per device */ ++ __u32 d_ntracks; /* # of tracks per cylinder */ ++ __u32 d_nsectors; /* # of data sectors per track */ ++ __u32 d_secsize; /* # of bytes per sector */ ++ __u32 d_part_start; /* # of first sector of this partition */ ++ __u32 d_unknown1[12]; /* ? */ ++ __u32 d_alt_tbl; /* byte offset of alternate table */ ++ __u32 d_alt_len; /* byte length of alternate table */ ++ __u32 d_phys_cyl; /* # of physical cylinders per device */ ++ __u32 d_phys_trk; /* # of physical tracks per cylinder */ ++ __u32 d_phys_sec; /* # of physical sectors per track */ ++ __u32 d_phys_bytes; /* # of physical bytes per sector */ ++ __u32 d_unknown2; /* ? */ ++ __u32 d_unknown3; /* ? */ ++ __u32 d_pad[8]; /* pad */ ++ ++ struct unixware_vtoc { ++ __u32 v_magic; /* the magic number */ ++ __u32 v_version; /* version number */ ++ char v_name[8]; /* volume name */ ++ __u16 v_nslices; /* # of slices */ ++ __u16 v_unknown1; /* ? */ ++ __u32 v_reserved[10]; /* reserved */ ++ struct unixware_slice ++ v_slice[UNIXWARE_NUMSLICE]; /* slice headers */ ++ } vtoc; ++ ++}; /* 408 */ ++ ++#endif /* CONFIG_UNIXWARE_DISKLABEL */ ++ ++#ifdef CONFIG_MINIX_SUBPARTITION ++# define MINIX_NR_SUBPARTITIONS 4 ++#endif /* CONFIG_MINIX_SUBPARTITION */ ++ ++#ifdef __KERNEL__ ++ ++char *disk_name (struct gendisk *hd, int minor, char *buf); ++ ++/* ++ * Account for the completion of an IO request (used by drivers which ++ * bypass the normal end_request processing) ++ */ ++struct request; ++ ++#ifdef CONFIG_BLK_STATS ++extern void disk_round_stats(struct hd_struct *hd); ++extern void req_new_io(struct request *req, int merge, int sectors); ++extern void req_merged_io(struct request *req); ++extern void req_finished_io(struct request *req); ++#else ++static inline void req_new_io(struct request *req, int merge, int sectors) { } ++static inline void req_merged_io(struct request *req) { } ++static inline void req_finished_io(struct request *req) { } ++#endif /* CONFIG_BLK_STATS */ ++ ++extern void devfs_register_partitions (struct gendisk *dev, int minor, ++ int unregister); ++ ++ ++ ++/* ++ * FIXME: this should use genhd->minor_shift, but that is slow to look up. ++ */ ++static inline unsigned int disk_index (kdev_t dev) ++{ ++ int major = MAJOR(dev); ++ int minor = MINOR(dev); ++ unsigned int index; ++ ++ switch (major) { ++ case DAC960_MAJOR+0: ++ index = (minor & 0x00f8) >> 3; ++ break; ++ case SCSI_DISK0_MAJOR: ++ index = (minor & 0x00f0) >> 4; ++ break; ++ case IDE0_MAJOR: /* same as HD_MAJOR */ ++ case XT_DISK_MAJOR: ++ index = (minor & 0x0040) >> 6; ++ break; ++ case IDE1_MAJOR: ++ index = ((minor & 0x0040) >> 6) + 2; ++ break; ++ default: ++ return 0; ++ } ++ return index; ++} ++ ++#endif ++ ++#endif +diff -Nur ./kernel-headers/linux/hdreg.h ./kernel-headers/linux/hdreg.h +--- ./kernel-headers/linux/hdreg.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/hdreg.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,746 @@ ++#ifndef _LINUX_HDREG_H ++#define _LINUX_HDREG_H ++ ++/* ++ * This file contains some defines for the AT-hd-controller. ++ * Various sources. ++ */ ++ ++#define HD_IRQ 14 /* the standard disk interrupt */ ++ ++/* ide.c has its own port definitions in "ide.h" */ ++ ++/* Hd controller regs. Ref: IBM AT Bios-listing */ ++#define HD_DATA 0x1f0 /* _CTL when writing */ ++#define HD_ERROR 0x1f1 /* see err-bits */ ++#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */ ++#define HD_SECTOR 0x1f3 /* starting sector */ ++#define HD_LCYL 0x1f4 /* starting cylinder */ ++#define HD_HCYL 0x1f5 /* high byte of starting cyl */ ++#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */ ++#define HD_STATUS 0x1f7 /* see status-bits */ ++#define HD_FEATURE HD_ERROR /* same io address, read=error, write=feature */ ++#define HD_PRECOMP HD_FEATURE /* obsolete use of this port - predates IDE */ ++#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */ ++ ++#define HD_CMD 0x3f6 /* used for resets */ ++#define HD_ALTSTATUS 0x3f6 /* same as HD_STATUS but doesn't clear irq */ ++ ++/* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */ ++ ++/* Bits of HD_STATUS */ ++#define ERR_STAT 0x01 ++#define INDEX_STAT 0x02 ++#define ECC_STAT 0x04 /* Corrected error */ ++#define DRQ_STAT 0x08 ++#define SEEK_STAT 0x10 ++#define SRV_STAT 0x10 ++#define WRERR_STAT 0x20 ++#define READY_STAT 0x40 ++#define BUSY_STAT 0x80 ++ ++/* Bits for HD_ERROR */ ++#define MARK_ERR 0x01 /* Bad address mark */ ++#define TRK0_ERR 0x02 /* couldn't find track 0 */ ++#define ABRT_ERR 0x04 /* Command aborted */ ++#define MCR_ERR 0x08 /* media change request */ ++#define ID_ERR 0x10 /* ID field not found */ ++#define MC_ERR 0x20 /* media changed */ ++#define ECC_ERR 0x40 /* Uncorrectable ECC error */ ++#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */ ++#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */ ++ ++/* Bits of HD_NSECTOR */ ++#define CD 0x01 ++#define IO 0x02 ++#define REL 0x04 ++#define TAG_MASK 0xf8 ++ ++ ++/* ++ * Command Header sizes for IOCTL commands ++ * HDIO_DRIVE_CMD, HDIO_DRIVE_TASK, and HDIO_DRIVE_TASKFILE ++ */ ++ ++#if 0 ++#include ++typedef ide_ioreg_t task_ioreg_t; ++#else ++typedef unsigned char task_ioreg_t; ++#endif ++ ++typedef unsigned long sata_ioreg_t; ++ ++#define HDIO_DRIVE_CMD_HDR_SIZE 4*sizeof(task_ioreg_t) ++#define HDIO_DRIVE_TASK_HDR_SIZE 8*sizeof(task_ioreg_t) ++#define HDIO_DRIVE_HOB_HDR_SIZE 8*sizeof(task_ioreg_t) ++ ++#define IDE_DRIVE_TASK_INVALID -1 ++#define IDE_DRIVE_TASK_NO_DATA 0 ++#define IDE_DRIVE_TASK_SET_XFER 1 ++ ++#define IDE_DRIVE_TASK_IN 2 ++ ++#define IDE_DRIVE_TASK_OUT 3 ++#define IDE_DRIVE_TASK_RAW_WRITE 4 ++ ++struct hd_drive_cmd_hdr { ++ task_ioreg_t command; ++ task_ioreg_t sector_number; ++ task_ioreg_t feature; ++ task_ioreg_t sector_count; ++}; ++ ++typedef struct hd_drive_task_hdr { ++ task_ioreg_t data; ++ task_ioreg_t feature; ++ task_ioreg_t sector_count; ++ task_ioreg_t sector_number; ++ task_ioreg_t low_cylinder; ++ task_ioreg_t high_cylinder; ++ task_ioreg_t device_head; ++ task_ioreg_t command; ++} task_struct_t; ++ ++typedef struct hd_drive_hob_hdr { ++ task_ioreg_t data; ++ task_ioreg_t feature; ++ task_ioreg_t sector_count; ++ task_ioreg_t sector_number; ++ task_ioreg_t low_cylinder; ++ task_ioreg_t high_cylinder; ++ task_ioreg_t device_head; ++ task_ioreg_t control; ++} hob_struct_t; ++ ++typedef union ide_reg_valid_s { ++ unsigned all : 16; ++ struct { ++ unsigned data : 1; ++ unsigned error_feature : 1; ++ unsigned sector : 1; ++ unsigned nsector : 1; ++ unsigned lcyl : 1; ++ unsigned hcyl : 1; ++ unsigned select : 1; ++ unsigned status_command : 1; ++ ++ unsigned data_hob : 1; ++ unsigned error_feature_hob : 1; ++ unsigned sector_hob : 1; ++ unsigned nsector_hob : 1; ++ unsigned lcyl_hob : 1; ++ unsigned hcyl_hob : 1; ++ unsigned select_hob : 1; ++ unsigned control_hob : 1; ++ } b; ++} ide_reg_valid_t; ++ ++/* ++ * Define standard taskfile in/out register ++ */ ++#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE ++#define IDE_TASKFILE_STD_IN_FLAGS 0xFE ++#define IDE_HOB_STD_OUT_FLAGS 0x3C ++#define IDE_HOB_STD_IN_FLAGS 0x3C ++ ++typedef struct ide_task_request_s { ++ task_ioreg_t io_ports[8]; ++ task_ioreg_t hob_ports[8]; ++ ide_reg_valid_t out_flags; ++ ide_reg_valid_t in_flags; ++ int data_phase; ++ int req_cmd; ++ unsigned long out_size; ++ unsigned long in_size; ++} ide_task_request_t; ++ ++typedef struct ide_ioctl_request_s { ++ ide_task_request_t *task_request; ++ unsigned char *out_buffer; ++ unsigned char *in_buffer; ++} ide_ioctl_request_t; ++ ++#define TASKFILE_INVALID 0x7fff ++#define TASKFILE_48 0x8000 ++ ++#define TASKFILE_NO_DATA 0x0000 ++ ++#define TASKFILE_IN 0x0001 ++#define TASKFILE_MULTI_IN 0x0002 ++ ++#define TASKFILE_OUT 0x0004 ++#define TASKFILE_MULTI_OUT 0x0008 ++#define TASKFILE_IN_OUT 0x0010 ++ ++#define TASKFILE_IN_DMA 0x0020 ++#define TASKFILE_OUT_DMA 0x0040 ++#define TASKFILE_IN_DMAQ 0x0080 ++#define TASKFILE_OUT_DMAQ 0x0100 ++ ++#define TASKFILE_P_IN 0x0200 ++#define TASKFILE_P_OUT 0x0400 ++#define TASKFILE_P_IN_DMA 0x0800 ++#define TASKFILE_P_OUT_DMA 0x1000 ++#define TASKFILE_P_IN_DMAQ 0x2000 ++#define TASKFILE_P_OUT_DMAQ 0x4000 ++ ++/* ATA/ATAPI Commands pre T13 Spec */ ++#define WIN_NOP 0x00 ++/* ++ * 0x01->0x02 Reserved ++ */ ++#define CFA_REQ_EXT_ERROR_CODE 0x03 /* CFA Request Extended Error Code */ ++/* ++ * 0x04->0x07 Reserved ++ */ ++#define WIN_SRST 0x08 /* ATAPI soft reset command */ ++#define WIN_DEVICE_RESET 0x08 ++/* ++ * 0x09->0x0F Reserved ++ */ ++#define WIN_RECAL 0x10 ++#define WIN_RESTORE WIN_RECAL ++/* ++ * 0x10->0x1F Reserved ++ */ ++#define WIN_READ 0x20 /* 28-Bit */ ++#define WIN_READ_ONCE 0x21 /* 28-Bit without retries */ ++#define WIN_READ_LONG 0x22 /* 28-Bit */ ++#define WIN_READ_LONG_ONCE 0x23 /* 28-Bit without retries */ ++#define WIN_READ_EXT 0x24 /* 48-Bit */ ++#define WIN_READDMA_EXT 0x25 /* 48-Bit */ ++#define WIN_READDMA_QUEUED_EXT 0x26 /* 48-Bit */ ++#define WIN_READ_NATIVE_MAX_EXT 0x27 /* 48-Bit */ ++/* ++ * 0x28 ++ */ ++#define WIN_MULTREAD_EXT 0x29 /* 48-Bit */ ++/* ++ * 0x2A->0x2F Reserved ++ */ ++#define WIN_WRITE 0x30 /* 28-Bit */ ++#define WIN_WRITE_ONCE 0x31 /* 28-Bit without retries */ ++#define WIN_WRITE_LONG 0x32 /* 28-Bit */ ++#define WIN_WRITE_LONG_ONCE 0x33 /* 28-Bit without retries */ ++#define WIN_WRITE_EXT 0x34 /* 48-Bit */ ++#define WIN_WRITEDMA_EXT 0x35 /* 48-Bit */ ++#define WIN_WRITEDMA_QUEUED_EXT 0x36 /* 48-Bit */ ++#define WIN_SET_MAX_EXT 0x37 /* 48-Bit */ ++#define CFA_WRITE_SECT_WO_ERASE 0x38 /* CFA Write Sectors without erase */ ++#define WIN_MULTWRITE_EXT 0x39 /* 48-Bit */ ++/* ++ * 0x3A->0x3B Reserved ++ */ ++#define WIN_WRITE_VERIFY 0x3C /* 28-Bit */ ++/* ++ * 0x3D->0x3F Reserved ++ */ ++#define WIN_VERIFY 0x40 /* 28-Bit - Read Verify Sectors */ ++#define WIN_VERIFY_ONCE 0x41 /* 28-Bit - without retries */ ++#define WIN_VERIFY_EXT 0x42 /* 48-Bit */ ++/* ++ * 0x43->0x4F Reserved ++ */ ++#define WIN_FORMAT 0x50 ++/* ++ * 0x51->0x5F Reserved ++ */ ++#define WIN_INIT 0x60 ++/* ++ * 0x61->0x5F Reserved ++ */ ++#define WIN_SEEK 0x70 /* 0x70-0x7F Reserved */ ++#define CFA_TRANSLATE_SECTOR 0x87 /* CFA Translate Sector */ ++#define WIN_DIAGNOSE 0x90 ++#define WIN_SPECIFY 0x91 /* set drive geometry translation */ ++#define WIN_DOWNLOAD_MICROCODE 0x92 ++#define WIN_STANDBYNOW2 0x94 ++#define WIN_STANDBY2 0x96 ++#define WIN_SETIDLE2 0x97 ++#define WIN_CHECKPOWERMODE2 0x98 ++#define WIN_SLEEPNOW2 0x99 ++/* ++ * 0x9A VENDOR ++ */ ++#define WIN_PACKETCMD 0xA0 /* Send a packet command. */ ++#define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */ ++#define WIN_QUEUED_SERVICE 0xA2 ++#define WIN_SMART 0xB0 /* self-monitoring and reporting */ ++#define CFA_ERASE_SECTORS 0xC0 ++#define WIN_MULTREAD 0xC4 /* read sectors using multiple mode*/ ++#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */ ++#define WIN_SETMULT 0xC6 /* enable/disable multiple mode */ ++#define WIN_READDMA_QUEUED 0xC7 /* read sectors using Queued DMA transfers */ ++#define WIN_READDMA 0xC8 /* read sectors using DMA transfers */ ++#define WIN_READDMA_ONCE 0xC9 /* 28-Bit - without retries */ ++#define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */ ++#define WIN_WRITEDMA_ONCE 0xCB /* 28-Bit - without retries */ ++#define WIN_WRITEDMA_QUEUED 0xCC /* write sectors using Queued DMA transfers */ ++#define CFA_WRITE_MULTI_WO_ERASE 0xCD /* CFA Write multiple without erase */ ++#define WIN_GETMEDIASTATUS 0xDA ++#define WIN_ACKMEDIACHANGE 0xDB /* ATA-1, ATA-2 vendor */ ++#define WIN_POSTBOOT 0xDC ++#define WIN_PREBOOT 0xDD ++#define WIN_DOORLOCK 0xDE /* lock door on removable drives */ ++#define WIN_DOORUNLOCK 0xDF /* unlock door on removable drives */ ++#define WIN_STANDBYNOW1 0xE0 ++#define WIN_IDLEIMMEDIATE 0xE1 /* force drive to become "ready" */ ++#define WIN_STANDBY 0xE2 /* Set device in Standby Mode */ ++#define WIN_SETIDLE1 0xE3 ++#define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */ ++#define WIN_CHECKPOWERMODE1 0xE5 ++#define WIN_SLEEPNOW1 0xE6 ++#define WIN_FLUSH_CACHE 0xE7 ++#define WIN_WRITE_BUFFER 0xE8 /* force write only 1 sector */ ++#define WIN_WRITE_SAME 0xE9 /* read ata-2 to use */ ++ /* SET_FEATURES 0x22 or 0xDD */ ++#define WIN_FLUSH_CACHE_EXT 0xEA /* 48-Bit */ ++#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */ ++#define WIN_MEDIAEJECT 0xED ++#define WIN_IDENTIFY_DMA 0xEE /* same as WIN_IDENTIFY, but DMA */ ++#define WIN_SETFEATURES 0xEF /* set special drive features */ ++#define EXABYTE_ENABLE_NEST 0xF0 ++#define WIN_SECURITY_SET_PASS 0xF1 ++#define WIN_SECURITY_UNLOCK 0xF2 ++#define WIN_SECURITY_ERASE_PREPARE 0xF3 ++#define WIN_SECURITY_ERASE_UNIT 0xF4 ++#define WIN_SECURITY_FREEZE_LOCK 0xF5 ++#define WIN_SECURITY_DISABLE 0xF6 ++#define WIN_READ_NATIVE_MAX 0xF8 /* return the native maximum address */ ++#define WIN_SET_MAX 0xF9 ++#define DISABLE_SEAGATE 0xFB ++ ++/* WIN_SMART sub-commands */ ++ ++#define SMART_READ_VALUES 0xD0 ++#define SMART_READ_THRESHOLDS 0xD1 ++#define SMART_AUTOSAVE 0xD2 ++#define SMART_SAVE 0xD3 ++#define SMART_IMMEDIATE_OFFLINE 0xD4 ++#define SMART_READ_LOG_SECTOR 0xD5 ++#define SMART_WRITE_LOG_SECTOR 0xD6 ++#define SMART_WRITE_THRESHOLDS 0xD7 ++#define SMART_ENABLE 0xD8 ++#define SMART_DISABLE 0xD9 ++#define SMART_STATUS 0xDA ++#define SMART_AUTO_OFFLINE 0xDB ++ ++/* Password used in TF4 & TF5 executing SMART commands */ ++ ++#define SMART_LCYL_PASS 0x4F ++#define SMART_HCYL_PASS 0xC2 ++ ++/* WIN_SETFEATURES sub-commands */ ++#define SETFEATURES_EN_8BIT 0x01 /* Enable 8-Bit Transfers */ ++#define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */ ++#define SETFEATURES_XFER 0x03 /* Set transfer mode */ ++# define XFER_UDMA_7 0x47 /* 0100|0111 */ ++# define XFER_UDMA_6 0x46 /* 0100|0110 */ ++# define XFER_UDMA_5 0x45 /* 0100|0101 */ ++# define XFER_UDMA_4 0x44 /* 0100|0100 */ ++# define XFER_UDMA_3 0x43 /* 0100|0011 */ ++# define XFER_UDMA_2 0x42 /* 0100|0010 */ ++# define XFER_UDMA_1 0x41 /* 0100|0001 */ ++# define XFER_UDMA_0 0x40 /* 0100|0000 */ ++# define XFER_MW_DMA_2 0x22 /* 0010|0010 */ ++# define XFER_MW_DMA_1 0x21 /* 0010|0001 */ ++# define XFER_MW_DMA_0 0x20 /* 0010|0000 */ ++# define XFER_SW_DMA_2 0x12 /* 0001|0010 */ ++# define XFER_SW_DMA_1 0x11 /* 0001|0001 */ ++# define XFER_SW_DMA_0 0x10 /* 0001|0000 */ ++# define XFER_PIO_4 0x0C /* 0000|1100 */ ++# define XFER_PIO_3 0x0B /* 0000|1011 */ ++# define XFER_PIO_2 0x0A /* 0000|1010 */ ++# define XFER_PIO_1 0x09 /* 0000|1001 */ ++# define XFER_PIO_0 0x08 /* 0000|1000 */ ++# define XFER_PIO_SLOW 0x00 /* 0000|0000 */ ++#define SETFEATURES_DIS_DEFECT 0x04 /* Disable Defect Management */ ++#define SETFEATURES_EN_APM 0x05 /* Enable advanced power management */ ++#define SETFEATURES_EN_SAME_R 0x22 /* for a region ATA-1 */ ++#define SETFEATURES_DIS_MSN 0x31 /* Disable Media Status Notification */ ++#define SETFEATURES_DIS_RETRY 0x33 /* Disable Retry */ ++#define SETFEATURES_EN_AAM 0x42 /* Enable Automatic Acoustic Management */ ++#define SETFEATURES_RW_LONG 0x44 /* Set Lenght of VS bytes */ ++#define SETFEATURES_SET_CACHE 0x54 /* Set Cache segments to SC Reg. Val */ ++#define SETFEATURES_DIS_RLA 0x55 /* Disable read look-ahead feature */ ++#define SETFEATURES_EN_RI 0x5D /* Enable release interrupt */ ++#define SETFEATURES_EN_SI 0x5E /* Enable SERVICE interrupt */ ++#define SETFEATURES_DIS_RPOD 0x66 /* Disable reverting to power on defaults */ ++#define SETFEATURES_DIS_ECC 0x77 /* Disable ECC byte count */ ++#define SETFEATURES_DIS_8BIT 0x81 /* Disable 8-Bit Transfers */ ++#define SETFEATURES_DIS_WCACHE 0x82 /* Disable write cache */ ++#define SETFEATURES_EN_DEFECT 0x84 /* Enable Defect Management */ ++#define SETFEATURES_DIS_APM 0x85 /* Disable advanced power management */ ++#define SETFEATURES_EN_ECC 0x88 /* Enable ECC byte count */ ++#define SETFEATURES_EN_MSN 0x95 /* Enable Media Status Notification */ ++#define SETFEATURES_EN_RETRY 0x99 /* Enable Retry */ ++#define SETFEATURES_EN_RLA 0xAA /* Enable read look-ahead feature */ ++#define SETFEATURES_PREFETCH 0xAB /* Sets drive prefetch value */ ++#define SETFEATURES_EN_REST 0xAC /* ATA-1 */ ++#define SETFEATURES_4B_RW_LONG 0xBB /* Set Lenght of 4 bytes */ ++#define SETFEATURES_DIS_AAM 0xC2 /* Disable Automatic Acoustic Management */ ++#define SETFEATURES_EN_RPOD 0xCC /* Enable reverting to power on defaults */ ++#define SETFEATURES_DIS_RI 0xDD /* Disable release interrupt ATAPI */ ++#define SETFEATURES_EN_SAME_M 0xDD /* for a entire device ATA-1 */ ++#define SETFEATURES_DIS_SI 0xDE /* Disable SERVICE interrupt ATAPI */ ++ ++/* WIN_SECURITY sub-commands */ ++ ++#define SECURITY_SET_PASSWORD 0xBA ++#define SECURITY_UNLOCK 0xBB ++#define SECURITY_ERASE_PREPARE 0xBC ++#define SECURITY_ERASE_UNIT 0xBD ++#define SECURITY_FREEZE_LOCK 0xBE ++#define SECURITY_DISABLE_PASSWORD 0xBF ++ ++struct hd_geometry { ++ unsigned char heads; ++ unsigned char sectors; ++ unsigned short cylinders; ++ unsigned long start; ++}; ++ ++/* BIG GEOMETRY */ ++struct hd_big_geometry { ++ unsigned char heads; ++ unsigned char sectors; ++ unsigned int cylinders; ++ unsigned long start; ++}; ++ ++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */ ++#define HDIO_GETGEO 0x0301 /* get device geometry */ ++#define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ ++#define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ ++#define HDIO_GET_QDMA 0x0305 /* get use-qdma flag */ ++ ++#define HDIO_SET_XFER 0x0306 /* set transfer rate via proc */ ++ ++#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */ ++#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ ++#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ ++#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ ++#define HDIO_GET_DMA 0x030b /* get use-dma flag */ ++#define HDIO_GET_NICE 0x030c /* get nice flags */ ++#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ ++#define HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */ ++#define HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */ ++#define HDIO_GET_ADDRESS 0x0310 /* */ ++ ++#define HDIO_GET_BUSSTATE 0x031a /* get the bus state of the hwif */ ++#define HDIO_TRISTATE_HWIF 0x031b /* execute a channel tristate */ ++#define HDIO_DRIVE_RESET 0x031c /* execute a device reset */ ++#define HDIO_DRIVE_TASKFILE 0x031d /* execute raw taskfile */ ++#define HDIO_DRIVE_TASK 0x031e /* execute task and special drive command */ ++#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ ++ ++#define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK ++ ++/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */ ++#define HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */ ++#define HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */ ++#define HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */ ++#define HDIO_SET_32BIT 0x0324 /* change io_32bit flags */ ++#define HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */ ++#define HDIO_SET_DMA 0x0326 /* change use-dma flag */ ++#define HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ ++#define HDIO_SCAN_HWIF 0x0328 /* register and (re)scan interface */ ++#define HDIO_SET_NICE 0x0329 /* set nice flags */ ++#define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */ ++#define HDIO_SET_WCACHE 0x032b /* change write cache enable-disable */ ++#define HDIO_SET_ACOUSTIC 0x032c /* change acoustic behavior */ ++#define HDIO_SET_BUSSTATE 0x032d /* set the bus state of the hwif */ ++#define HDIO_SET_QDMA 0x032e /* change use-qdma flag */ ++#define HDIO_SET_ADDRESS 0x032f /* change lba addressing modes */ ++ ++/* bus states */ ++enum { ++ BUSSTATE_OFF = 0, ++ BUSSTATE_ON, ++ BUSSTATE_TRISTATE ++}; ++ ++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ ++#define HDIO_GETGEO_BIG 0x0330 /* */ ++#define HDIO_GETGEO_BIG_RAW 0x0331 /* */ ++ ++#define HDIO_SET_IDE_SCSI 0x0338 ++#define HDIO_SET_SCSI_IDE 0x0339 ++ ++#define __NEW_HD_DRIVE_ID ++/* structure returned by HDIO_GET_IDENTITY, ++ * as per ANSI NCITS ATA6 rev.1b spec ++ */ ++struct hd_driveid { ++ unsigned short config; /* lots of obsolete bit flags */ ++ unsigned short cyls; /* Obsolete, "physical" cyls */ ++ unsigned short reserved2; /* reserved (word 2) */ ++ unsigned short heads; /* Obsolete, "physical" heads */ ++ unsigned short track_bytes; /* unformatted bytes per track */ ++ unsigned short sector_bytes; /* unformatted bytes per sector */ ++ unsigned short sectors; /* Obsolete, "physical" sectors per track */ ++ unsigned short vendor0; /* vendor unique */ ++ unsigned short vendor1; /* vendor unique */ ++ unsigned short vendor2; /* Retired vendor unique */ ++ unsigned char serial_no[20]; /* 0 = not_specified */ ++ unsigned short buf_type; /* Retired */ ++ unsigned short buf_size; /* Retired, 512 byte increments ++ * 0 = not_specified ++ */ ++ unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ ++ unsigned char fw_rev[8]; /* 0 = not_specified */ ++ unsigned char model[40]; /* 0 = not_specified */ ++ unsigned char max_multsect; /* 0=not_implemented */ ++ unsigned char vendor3; /* vendor unique */ ++ unsigned short dword_io; /* 0=not_implemented; 1=implemented */ ++ unsigned char vendor4; /* vendor unique */ ++ unsigned char capability; /* (upper byte of word 49) ++ * 3: IORDYsup ++ * 2: IORDYsw ++ * 1: LBA ++ * 0: DMA ++ */ ++ unsigned short reserved50; /* reserved (word 50) */ ++ unsigned char vendor5; /* Obsolete, vendor unique */ ++ unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ ++ unsigned char vendor6; /* Obsolete, vendor unique */ ++ unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ ++ unsigned short field_valid; /* (word 53) ++ * 2: ultra_ok word 88 ++ * 1: eide_ok words 64-70 ++ * 0: cur_ok words 54-58 ++ */ ++ unsigned short cur_cyls; /* Obsolete, logical cylinders */ ++ unsigned short cur_heads; /* Obsolete, l heads */ ++ unsigned short cur_sectors; /* Obsolete, l sectors per track */ ++ unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ ++ unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ ++ unsigned char multsect; /* current multiple sector count */ ++ unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ ++ unsigned int lba_capacity; /* Obsolete, total number of sectors */ ++ unsigned short dma_1word; /* Obsolete, single-word dma info */ ++ unsigned short dma_mword; /* multiple-word dma info */ ++ unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ ++ unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ ++ unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */ ++ unsigned short eide_pio; /* min cycle time (ns), no IORDY */ ++ unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ ++ unsigned short words69_70[2]; /* reserved words 69-70 ++ * future command overlap and queuing ++ */ ++ /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ ++ unsigned short words71_74[4]; /* reserved words 71-74 ++ * for IDENTIFY PACKET DEVICE command ++ */ ++ unsigned short queue_depth; /* (word 75) ++ * 15:5 reserved ++ * 4:0 Maximum queue depth -1 ++ */ ++ unsigned short words76_79[4]; /* reserved words 76-79 */ ++ unsigned short major_rev_num; /* (word 80) */ ++ unsigned short minor_rev_num; /* (word 81) */ ++ unsigned short command_set_1; /* (word 82) supported ++ * 15: Obsolete ++ * 14: NOP command ++ * 13: READ_BUFFER ++ * 12: WRITE_BUFFER ++ * 11: Obsolete ++ * 10: Host Protected Area ++ * 9: DEVICE Reset ++ * 8: SERVICE Interrupt ++ * 7: Release Interrupt ++ * 6: look-ahead ++ * 5: write cache ++ * 4: PACKET Command ++ * 3: Power Management Feature Set ++ * 2: Removable Feature Set ++ * 1: Security Feature Set ++ * 0: SMART Feature Set ++ */ ++ unsigned short command_set_2; /* (word 83) ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13: FLUSH CACHE EXT ++ * 12: FLUSH CACHE ++ * 11: Device Configuration Overlay ++ * 10: 48-bit Address Feature Set ++ * 9: Automatic Acoustic Management ++ * 8: SET MAX security ++ * 7: reserved 1407DT PARTIES ++ * 6: SetF sub-command Power-Up ++ * 5: Power-Up in Standby Feature Set ++ * 4: Removable Media Notification ++ * 3: APM Feature Set ++ * 2: CFA Feature Set ++ * 1: READ/WRITE DMA QUEUED ++ * 0: Download MicroCode ++ */ ++ unsigned short cfsse; /* (word 84) ++ * cmd set-feature supported extensions ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13:6 reserved ++ * 5: General Purpose Logging ++ * 4: Streaming Feature Set ++ * 3: Media Card Pass Through ++ * 2: Media Serial Number Valid ++ * 1: SMART selt-test supported ++ * 0: SMART error logging ++ */ ++ unsigned short cfs_enable_1; /* (word 85) ++ * command set-feature enabled ++ * 15: Obsolete ++ * 14: NOP command ++ * 13: READ_BUFFER ++ * 12: WRITE_BUFFER ++ * 11: Obsolete ++ * 10: Host Protected Area ++ * 9: DEVICE Reset ++ * 8: SERVICE Interrupt ++ * 7: Release Interrupt ++ * 6: look-ahead ++ * 5: write cache ++ * 4: PACKET Command ++ * 3: Power Management Feature Set ++ * 2: Removable Feature Set ++ * 1: Security Feature Set ++ * 0: SMART Feature Set ++ */ ++ unsigned short cfs_enable_2; /* (word 86) ++ * command set-feature enabled ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13: FLUSH CACHE EXT ++ * 12: FLUSH CACHE ++ * 11: Device Configuration Overlay ++ * 10: 48-bit Address Feature Set ++ * 9: Automatic Acoustic Management ++ * 8: SET MAX security ++ * 7: reserved 1407DT PARTIES ++ * 6: SetF sub-command Power-Up ++ * 5: Power-Up in Standby Feature Set ++ * 4: Removable Media Notification ++ * 3: APM Feature Set ++ * 2: CFA Feature Set ++ * 1: READ/WRITE DMA QUEUED ++ * 0: Download MicroCode ++ */ ++ unsigned short csf_default; /* (word 87) ++ * command set-feature default ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13:6 reserved ++ * 5: General Purpose Logging enabled ++ * 4: Valid CONFIGURE STREAM executed ++ * 3: Media Card Pass Through enabled ++ * 2: Media Serial Number Valid ++ * 1: SMART selt-test supported ++ * 0: SMART error logging ++ */ ++ unsigned short dma_ultra; /* (word 88) */ ++ unsigned short trseuc; /* time required for security erase */ ++ unsigned short trsEuc; /* time required for enhanced erase */ ++ unsigned short CurAPMvalues; /* current APM values */ ++ unsigned short mprc; /* master password revision code */ ++ unsigned short hw_config; /* hardware config (word 93) ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13: ++ * 12: ++ * 11: ++ * 10: ++ * 9: ++ * 8: ++ * 7: ++ * 6: ++ * 5: ++ * 4: ++ * 3: ++ * 2: ++ * 1: ++ * 0: Shall be ONE ++ */ ++ unsigned short acoustic; /* (word 94) ++ * 15:8 Vendor's recommended value ++ * 7:0 current value ++ */ ++ unsigned short msrqs; /* min stream request size */ ++ unsigned short sxfert; /* stream transfer time */ ++ unsigned short sal; /* stream access latency */ ++ unsigned int spg; /* stream performance granularity */ ++ unsigned long long lba_capacity_2;/* 48-bit total number of sectors */ ++ unsigned short words104_125[22];/* reserved words 104-125 */ ++ unsigned short last_lun; /* (word 126) */ ++ unsigned short word127; /* (word 127) Feature Set ++ * Removable Media Notification ++ * 15:2 reserved ++ * 1:0 00 = not supported ++ * 01 = supported ++ * 10 = reserved ++ * 11 = reserved ++ */ ++ unsigned short dlf; /* (word 128) ++ * device lock function ++ * 15:9 reserved ++ * 8 security level 1:max 0:high ++ * 7:6 reserved ++ * 5 enhanced erase ++ * 4 expire ++ * 3 frozen ++ * 2 locked ++ * 1 en/disabled ++ * 0 capability ++ */ ++ unsigned short csfo; /* (word 129) ++ * current set features options ++ * 15:4 reserved ++ * 3: auto reassign ++ * 2: reverting ++ * 1: read-look-ahead ++ * 0: write cache ++ */ ++ unsigned short words130_155[26];/* reserved vendor words 130-155 */ ++ unsigned short word156; /* reserved vendor word 156 */ ++ unsigned short words157_159[3];/* reserved vendor words 157-159 */ ++ unsigned short cfa_power; /* (word 160) CFA Power Mode ++ * 15 word 160 supported ++ * 14 reserved ++ * 13 ++ * 12 ++ * 11:0 ++ */ ++ unsigned short words161_175[15];/* Reserved for CFA */ ++ unsigned short words176_205[30];/* Current Media Serial Number */ ++ unsigned short words206_254[49];/* reserved words 206-254 */ ++ unsigned short integrity_word; /* (word 255) ++ * 15:8 Checksum ++ * 7:0 Signature ++ */ ++}; ++ ++/* ++ * IDE "nice" flags. These are used on a per drive basis to determine ++ * when to be nice and give more bandwidth to the other devices which ++ * share the same IDE bus. ++ */ ++#define IDE_NICE_DSC_OVERLAP (0) /* per the DSC overlap protocol */ ++#define IDE_NICE_ATAPI_OVERLAP (1) /* not supported yet */ ++#define IDE_NICE_0 (2) /* when sure that it won't affect us */ ++#define IDE_NICE_1 (3) /* when probably won't affect us much */ ++#define IDE_NICE_2 (4) /* when we know it's on our expense */ ++ ++#ifdef __KERNEL__ ++/* ++ * These routines are used for kernel command line parameters from main.c: ++ */ ++#include ++ ++#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ++int ide_register(int io_port, int ctl_port, int irq); ++int ide_unregister(unsigned int); ++#endif /* CONFIG_BLK_DEV_IDE || CONFIG_BLK_DEV_IDE_MODULE */ ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _LINUX_HDREG_H */ +diff -Nur ./kernel-headers/linux/ioctl.h ./kernel-headers/linux/ioctl.h +--- ./kernel-headers/linux/ioctl.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/ioctl.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,7 @@ ++#ifndef _LINUX_IOCTL_H ++#define _LINUX_IOCTL_H ++ ++#include ++ ++#endif /* _LINUX_IOCTL_H */ ++ +diff -Nur ./kernel-headers/linux/lvm.h ./kernel-headers/linux/lvm.h +--- ./kernel-headers/linux/lvm.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/lvm.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,756 @@ ++/* ++ * include/linux/lvm.h ++ * kernel/lvm.h ++ * tools/lib/lvm.h ++ * ++ * Copyright (C) 1997 - 2002 Heinz Mauelshagen, Sistina Software ++ * ++ * February-November 1997 ++ * May-July 1998 ++ * January-March,July,September,October,Dezember 1999 ++ * January,February,July,November 2000 ++ * January-March,June,July 2001 ++ * May 2002 ++ * ++ * lvm 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. ++ * ++ * lvm 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 GNU CC; see the file COPYING. If not, write to ++ * the Free Software Foundation, 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++/* ++ * Changelog ++ * ++ * 10/10/1997 - beginning of new structure creation ++ * 12/05/1998 - incorporated structures from lvm_v1.h and deleted lvm_v1.h ++ * 07/06/1998 - avoided LVM_KMALLOC_MAX define by using vmalloc/vfree ++ * instead of kmalloc/kfree ++ * 01/07/1998 - fixed wrong LVM_MAX_SIZE ++ * 07/07/1998 - extended pe_t structure by ios member (for statistic) ++ * 02/08/1998 - changes for official char/block major numbers ++ * 07/08/1998 - avoided init_module() and cleanup_module() to be static ++ * 29/08/1998 - seprated core and disk structure type definitions ++ * 01/09/1998 - merged kernel integration version (mike) ++ * 20/01/1999 - added LVM_PE_DISK_OFFSET macro for use in ++ * vg_read_with_pv_and_lv(), pv_move_pe(), pv_show_pe_text()... ++ * 18/02/1999 - added definition of time_disk_t structure for; ++ * keeps time stamps on disk for nonatomic writes (future) ++ * 15/03/1999 - corrected LV() and VG() macro definition to use argument ++ * instead of minor ++ * 03/07/1999 - define for genhd.c name handling ++ * 23/07/1999 - implemented snapshot part ++ * 08/12/1999 - changed LVM_LV_SIZE_MAX macro to reflect current 1TB limit ++ * 01/01/2000 - extended lv_v2 core structure by wait_queue member ++ * 12/02/2000 - integrated Andrea Arcagnelli's snapshot work ++ * 18/02/2000 - seperated user and kernel space parts by ++ * #ifdef them with __KERNEL__ ++ * 08/03/2000 - implemented cluster/shared bits for vg_access ++ * 26/06/2000 - implemented snapshot persistency and resizing support ++ * 02/11/2000 - added hash table size member to lv structure ++ * 12/11/2000 - removed unneeded timestamp definitions ++ * 24/12/2000 - removed LVM_TO_{CORE,DISK}*, use cpu_{from, to}_le* ++ * instead - Christoph Hellwig ++ * 22/01/2001 - Change ulong to uint32_t ++ * 14/02/2001 - changed LVM_SNAPSHOT_MIN_CHUNK to 1 page ++ * 20/02/2001 - incremented IOP version to 11 because of incompatible ++ * change in VG activation (in order to support devfs better) ++ * 01/03/2001 - Revert to IOP10 and add VG_CREATE_OLD call for compatibility ++ * 08/03/2001 - new lv_t (in core) version number 5: changed page member ++ * to (struct kiobuf *) to use for COW exception table io ++ * 26/03/2001 - changed lv_v4 to lv_v5 in structure definition (HM) ++ * 21/06/2001 - changed BLOCK_SIZE back to 1024 for non S/390 ++ * 22/06/2001 - added Andreas Dilger's PE on 4k boundary alignment enhancements ++ * 19/07/2001 - added rwsem compatibility macros for 2.2 kernels ++ * 13/11/2001 - reduced userspace inclusion of kernel headers to a minimum ++ * ++ */ ++ ++ ++#ifndef _LVM_H_INCLUDE ++#define _LVM_H_INCLUDE ++ ++#define LVM_RELEASE_NAME "1.0.5+" ++#define LVM_RELEASE_DATE "22/07/2002" ++ ++#define _LVM_KERNEL_H_VERSION "LVM "LVM_RELEASE_NAME" ("LVM_RELEASE_DATE")" ++ ++#include ++ ++/* ++ * preprocessor definitions ++ */ ++/* if you like emergency reset code in the driver */ ++#define LVM_TOTAL_RESET ++ ++#ifdef __KERNEL__ ++#undef LVM_HD_NAME /* display nice names in /proc/partitions */ ++ ++/* lots of debugging output (see driver source) ++ #define DEBUG_LVM_GET_INFO ++ #define DEBUG ++ #define DEBUG_MAP ++ #define DEBUG_MAP_SIZE ++ #define DEBUG_IOCTL ++ #define DEBUG_READ ++ #define DEBUG_GENDISK ++ #define DEBUG_VG_CREATE ++ #define DEBUG_DEVICE ++ #define DEBUG_KFREE ++ */ ++ ++#include ++#include ++#include ++#include ++#else ++/* This prevents the need to include which ++ causes problems on some platforms. It's not nice but then ++ neither is the alternative. */ ++struct list_head { ++ struct list_head *next, *prev; ++}; ++#define __KERNEL__ ++#include ++#undef __KERNEL__ ++#endif /* #ifndef __KERNEL__ */ ++ ++ ++#ifdef __KERNEL__ ++#include ++ ++#include ++#endif /* #ifdef __KERNEL__ */ ++ ++ ++#include ++ ++#if !defined ( LVM_BLK_MAJOR) || !defined ( LVM_CHAR_MAJOR) ++#error Bad include/linux/major.h - LVM MAJOR undefined ++#endif ++ ++#ifdef BLOCK_SIZE ++#undef BLOCK_SIZE ++#endif ++ ++#ifdef CONFIG_ARCH_S390 ++#define BLOCK_SIZE 4096 ++#else ++#define BLOCK_SIZE 1024 ++#endif ++ ++#ifndef SECTOR_SIZE ++#define SECTOR_SIZE 512 ++#endif ++ ++/* structure version */ ++#define LVM_STRUCT_VERSION 1 ++ ++#define LVM_DIR_PREFIX "/dev/" ++ ++/* ++ * i/o protocol version ++ * ++ * defined here for the driver and defined seperate in the ++ * user land tools/lib/liblvm.h ++ * ++ */ ++#define LVM_DRIVER_IOP_VERSION 10 ++ ++#define LVM_NAME "lvm" ++#define LVM_GLOBAL "global" ++#define LVM_DIR "lvm" ++#define LVM_VG_SUBDIR "VGs" ++#define LVM_LV_SUBDIR "LVs" ++#define LVM_PV_SUBDIR "PVs" ++ ++/* ++ * VG/LV indexing macros ++ */ ++/* character minor maps directly to volume group */ ++#define VG_CHR(a) ( a) ++ ++/* block minor indexes into a volume group/logical volume indirection table */ ++#define VG_BLK(a) ( vg_lv_map[a].vg_number) ++#define LV_BLK(a) ( vg_lv_map[a].lv_number) ++ ++/* ++ * absolute limits for VGs, PVs per VG and LVs per VG ++ */ ++#define ABS_MAX_VG 99 ++#define ABS_MAX_PV 256 ++#define ABS_MAX_LV 256 /* caused by 8 bit minor */ ++ ++#define MAX_VG ABS_MAX_VG ++#define MAX_LV ABS_MAX_LV ++#define MAX_PV ABS_MAX_PV ++ ++#if ( MAX_VG > ABS_MAX_VG) ++#undef MAX_VG ++#define MAX_VG ABS_MAX_VG ++#endif ++ ++#if ( MAX_LV > ABS_MAX_LV) ++#undef MAX_LV ++#define MAX_LV ABS_MAX_LV ++#endif ++ ++ ++/* ++ * VGDA: default disk spaces and offsets ++ * ++ * there's space after the structures for later extensions. ++ * ++ * offset what size ++ * --------------- ---------------------------------- ------------ ++ * 0 physical volume structure ~500 byte ++ * ++ * 1K volume group structure ~200 byte ++ * ++ * 6K namelist of physical volumes 128 byte each ++ * ++ * 6k + n * ~300byte n logical volume structures ~300 byte each ++ * ++ * + m * 4byte m physical extent alloc. structs 4 byte each ++ * ++ * End of disk - first physical extent typically 4 megabyte ++ * PE total * ++ * PE size ++ * ++ * ++ */ ++ ++/* DONT TOUCH THESE !!! */ ++ ++ ++ ++ ++ ++ ++ ++/* ++ * LVM_PE_T_MAX corresponds to: ++ * ++ * 8KB PE size can map a ~512 MB logical volume at the cost of 1MB memory, ++ * ++ * 128MB PE size can map a 8TB logical volume at the same cost of memory. ++ * ++ * Default PE size of 4 MB gives a maximum logical volume size of 256 GB. ++ * ++ * Maximum PE size of 16GB gives a maximum logical volume size of 1024 TB. ++ * ++ * AFAIK, the actual kernels limit this to 1 TB. ++ * ++ * Should be a sufficient spectrum ;*) ++ */ ++ ++/* This is the usable size of pe_disk_t.le_num !!! v v */ ++#define LVM_PE_T_MAX ( ( 1 << ( sizeof ( uint16_t) * 8)) - 2) ++ ++#define LVM_LV_SIZE_MAX(a) ( ( long long) LVM_PE_T_MAX * (a)->pe_size > ( long long) 1024*1024/SECTOR_SIZE*1024*1024 ? ( long long) 1024*1024/SECTOR_SIZE*1024*1024 : ( long long) LVM_PE_T_MAX * (a)->pe_size) ++#define LVM_MIN_PE_SIZE ( 8192L / SECTOR_SIZE) /* 8 KB in sectors */ ++#define LVM_MAX_PE_SIZE ( 16L * 1024L * 1024L / SECTOR_SIZE * 1024) /* 16GB in sectors */ ++#define LVM_DEFAULT_PE_SIZE ( 4096L * 1024 / SECTOR_SIZE) /* 4 MB in sectors */ ++#define LVM_DEFAULT_STRIPE_SIZE 16L /* 16 KB */ ++#define LVM_MIN_STRIPE_SIZE ( PAGE_SIZE/SECTOR_SIZE) /* PAGESIZE in sectors */ ++#define LVM_MAX_STRIPE_SIZE ( 512L * 1024 / SECTOR_SIZE) /* 512 KB in sectors */ ++#define LVM_MAX_STRIPES 128 /* max # of stripes */ ++#define LVM_MAX_SIZE ( 1024LU * 1024 / SECTOR_SIZE * 1024 * 1024) /* 1TB[sectors] */ ++#define LVM_MAX_MIRRORS 2 /* future use */ ++#define LVM_MIN_READ_AHEAD 0 /* minimum read ahead sectors */ ++#define LVM_DEFAULT_READ_AHEAD 1024 /* sectors for 512k scsi segments */ ++#define LVM_MAX_READ_AHEAD 1024 /* maximum read ahead sectors */ ++#define LVM_MAX_LV_IO_TIMEOUT 60 /* seconds I/O timeout (future use) */ ++#define LVM_PARTITION 0xfe /* LVM partition id */ ++#define LVM_NEW_PARTITION 0x8e /* new LVM partition id (10/09/1999) */ ++#define LVM_PE_SIZE_PV_SIZE_REL 5 /* max relation PV size and PE size */ ++ ++#define LVM_SNAPSHOT_MAX_CHUNK 1024 /* 1024 KB */ ++#define LVM_SNAPSHOT_DEF_CHUNK 64 /* 64 KB */ ++#define LVM_SNAPSHOT_MIN_CHUNK (PAGE_SIZE/1024) /* 4 or 8 KB */ ++ ++#define UNDEF -1 ++ ++/* ++ * ioctls ++ * FIXME: the last parameter to _IO{W,R,WR} is a data type. The macro will ++ * expand this using sizeof(), so putting "1" there is misleading ++ * because sizeof(1) = sizeof(int) = sizeof(2) = 4 on a 32-bit machine! ++ */ ++/* volume group */ ++#define VG_CREATE_OLD _IOW ( 0xfe, 0x00, 1) ++#define VG_REMOVE _IOW ( 0xfe, 0x01, 1) ++ ++#define VG_EXTEND _IOW ( 0xfe, 0x03, 1) ++#define VG_REDUCE _IOW ( 0xfe, 0x04, 1) ++ ++#define VG_STATUS _IOWR ( 0xfe, 0x05, 1) ++#define VG_STATUS_GET_COUNT _IOWR ( 0xfe, 0x06, 1) ++#define VG_STATUS_GET_NAMELIST _IOWR ( 0xfe, 0x07, 1) ++ ++#define VG_SET_EXTENDABLE _IOW ( 0xfe, 0x08, 1) ++#define VG_RENAME _IOW ( 0xfe, 0x09, 1) ++ ++/* Since 0.9beta6 */ ++#define VG_CREATE _IOW ( 0xfe, 0x0a, 1) ++ ++/* logical volume */ ++#define LV_CREATE _IOW ( 0xfe, 0x20, 1) ++#define LV_REMOVE _IOW ( 0xfe, 0x21, 1) ++ ++#define LV_ACTIVATE _IO ( 0xfe, 0x22) ++#define LV_DEACTIVATE _IO ( 0xfe, 0x23) ++ ++#define LV_EXTEND _IOW ( 0xfe, 0x24, 1) ++#define LV_REDUCE _IOW ( 0xfe, 0x25, 1) ++ ++#define LV_STATUS_BYNAME _IOWR ( 0xfe, 0x26, 1) ++#define LV_STATUS_BYINDEX _IOWR ( 0xfe, 0x27, 1) ++ ++#define LV_SET_ACCESS _IOW ( 0xfe, 0x28, 1) ++#define LV_SET_ALLOCATION _IOW ( 0xfe, 0x29, 1) ++#define LV_SET_STATUS _IOW ( 0xfe, 0x2a, 1) ++ ++#define LE_REMAP _IOW ( 0xfe, 0x2b, 1) ++ ++#define LV_SNAPSHOT_USE_RATE _IOWR ( 0xfe, 0x2c, 1) ++ ++#define LV_STATUS_BYDEV _IOWR ( 0xfe, 0x2e, 1) ++ ++#define LV_RENAME _IOW ( 0xfe, 0x2f, 1) ++ ++#define LV_BMAP _IOWR ( 0xfe, 0x30, 1) ++ ++ ++/* physical volume */ ++#define PV_STATUS _IOWR ( 0xfe, 0x40, 1) ++#define PV_CHANGE _IOWR ( 0xfe, 0x41, 1) ++#define PV_FLUSH _IOW ( 0xfe, 0x42, 1) ++ ++/* physical extent */ ++#define PE_LOCK_UNLOCK _IOW ( 0xfe, 0x50, 1) ++ ++/* i/o protocol version */ ++#define LVM_GET_IOP_VERSION _IOR ( 0xfe, 0x98, 1) ++ ++#ifdef LVM_TOTAL_RESET ++/* special reset function for testing purposes */ ++#define LVM_RESET _IO ( 0xfe, 0x99) ++#endif ++ ++/* lock the logical volume manager */ ++#if LVM_DRIVER_IOP_VERSION > 11 ++#define LVM_LOCK_LVM _IO ( 0xfe, 0x9A) ++#else ++/* This is actually the same as _IO ( 0xff, 0x00), oops. Remove for IOP 12+ */ ++#define LVM_LOCK_LVM _IO ( 0xfe, 0x100) ++#endif ++/* END ioctls */ ++ ++ ++/* ++ * Status flags ++ */ ++/* volume group */ ++#define VG_ACTIVE 0x01 /* vg_status */ ++#define VG_EXPORTED 0x02 /* " */ ++#define VG_EXTENDABLE 0x04 /* " */ ++ ++#define VG_READ 0x01 /* vg_access */ ++#define VG_WRITE 0x02 /* " */ ++#define VG_CLUSTERED 0x04 /* " */ ++#define VG_SHARED 0x08 /* " */ ++ ++/* logical volume */ ++#define LV_ACTIVE 0x01 /* lv_status */ ++#define LV_SPINDOWN 0x02 /* " */ ++ ++#define LV_READ 0x01 /* lv_access */ ++#define LV_WRITE 0x02 /* " */ ++#define LV_SNAPSHOT 0x04 /* " */ ++#define LV_SNAPSHOT_ORG 0x08 /* " */ ++ ++#define LV_BADBLOCK_ON 0x01 /* lv_badblock */ ++ ++#define LV_STRICT 0x01 /* lv_allocation */ ++#define LV_CONTIGUOUS 0x02 /* " */ ++ ++/* physical volume */ ++#define PV_ACTIVE 0x01 /* pv_status */ ++#define PV_ALLOCATABLE 0x02 /* pv_allocatable */ ++ ++ ++/* misc */ ++#define LVM_SNAPSHOT_DROPPED_SECTOR 1 ++ ++/* ++ * Structure definitions core/disk follow ++ * ++ * conditional conversion takes place on big endian architectures ++ * in functions * pv_copy_*(), vg_copy_*() and lv_copy_*() ++ * ++ */ ++ ++#define NAME_LEN 128 /* don't change!!! */ ++#define UUID_LEN 32 /* don't change!!! */ ++ ++/* copy on write tables in disk format */ ++typedef struct lv_COW_table_disk_v1 { ++ uint64_t pv_org_number; ++ uint64_t pv_org_rsector; ++ uint64_t pv_snap_number; ++ uint64_t pv_snap_rsector; ++} lv_COW_table_disk_t; ++ ++/* remap physical sector/rdev pairs including hash */ ++typedef struct lv_block_exception_v1 { ++ struct list_head hash; ++ uint32_t rsector_org; ++ kdev_t rdev_org; ++ uint32_t rsector_new; ++ kdev_t rdev_new; ++} lv_block_exception_t; ++ ++/* disk stored pe information */ ++typedef struct { ++ uint16_t lv_num; ++ uint16_t le_num; ++} pe_disk_t; ++ ++/* disk stored PV, VG, LV and PE size and offset information */ ++typedef struct { ++ uint32_t base; ++ uint32_t size; ++} lvm_disk_data_t; ++ ++ ++/* ++ * physical volume structures ++ */ ++ ++/* core */ ++typedef struct pv_v2 { ++ char id[2]; /* Identifier */ ++ unsigned short version; /* HM lvm version */ ++ lvm_disk_data_t pv_on_disk; ++ lvm_disk_data_t vg_on_disk; ++ lvm_disk_data_t pv_uuidlist_on_disk; ++ lvm_disk_data_t lv_on_disk; ++ lvm_disk_data_t pe_on_disk; ++ char pv_name[NAME_LEN]; ++ char vg_name[NAME_LEN]; ++ char system_id[NAME_LEN]; /* for vgexport/vgimport */ ++ kdev_t pv_dev; ++ uint pv_number; ++ uint pv_status; ++ uint pv_allocatable; ++ uint pv_size; /* HM */ ++ uint lv_cur; ++ uint pe_size; ++ uint pe_total; ++ uint pe_allocated; ++ uint pe_stale; /* for future use */ ++ pe_disk_t *pe; /* HM */ ++ struct block_device *bd; ++ char pv_uuid[UUID_LEN+1]; ++ ++#ifndef __KERNEL__ ++ uint32_t pe_start; /* in sectors */ ++#endif ++} pv_t; ++ ++ ++/* disk */ ++typedef struct pv_disk_v2 { ++ uint8_t id[2]; /* Identifier */ ++ uint16_t version; /* HM lvm version */ ++ lvm_disk_data_t pv_on_disk; ++ lvm_disk_data_t vg_on_disk; ++ lvm_disk_data_t pv_uuidlist_on_disk; ++ lvm_disk_data_t lv_on_disk; ++ lvm_disk_data_t pe_on_disk; ++ uint8_t pv_uuid[NAME_LEN]; ++ uint8_t vg_name[NAME_LEN]; ++ uint8_t system_id[NAME_LEN]; /* for vgexport/vgimport */ ++ uint32_t pv_major; ++ uint32_t pv_number; ++ uint32_t pv_status; ++ uint32_t pv_allocatable; ++ uint32_t pv_size; /* HM */ ++ uint32_t lv_cur; ++ uint32_t pe_size; ++ uint32_t pe_total; ++ uint32_t pe_allocated; ++ ++ /* new in struct version 2 */ ++ uint32_t pe_start; /* in sectors */ ++ ++} pv_disk_t; ++ ++ ++/* ++ * Structures for Logical Volume (LV) ++ */ ++ ++/* core PE information */ ++typedef struct { ++ kdev_t dev; ++ uint32_t pe; /* to be changed if > 2TB */ ++ uint32_t reads; ++ uint32_t writes; ++} pe_t; ++ ++typedef struct { ++ char lv_name[NAME_LEN]; ++ kdev_t old_dev; ++ kdev_t new_dev; ++ uint32_t old_pe; ++ uint32_t new_pe; ++} le_remap_req_t; ++ ++typedef struct lv_bmap { ++ uint32_t lv_block; ++ dev_t lv_dev; ++} lv_bmap_t; ++ ++/* ++ * Structure Logical Volume (LV) Version 3 ++ */ ++ ++/* core */ ++typedef struct lv_v5 { ++ char lv_name[NAME_LEN]; ++ char vg_name[NAME_LEN]; ++ uint lv_access; ++ uint lv_status; ++ uint lv_open; /* HM */ ++ kdev_t lv_dev; /* HM */ ++ uint lv_number; /* HM */ ++ uint lv_mirror_copies; /* for future use */ ++ uint lv_recovery; /* " */ ++ uint lv_schedule; /* " */ ++ uint lv_size; ++ pe_t *lv_current_pe; /* HM */ ++ uint lv_current_le; /* for future use */ ++ uint lv_allocated_le; ++ uint lv_stripes; ++ uint lv_stripesize; ++ uint lv_badblock; /* for future use */ ++ uint lv_allocation; ++ uint lv_io_timeout; /* for future use */ ++ uint lv_read_ahead; ++ ++ /* delta to version 1 starts here */ ++ struct lv_v5 *lv_snapshot_org; ++ struct lv_v5 *lv_snapshot_prev; ++ struct lv_v5 *lv_snapshot_next; ++ lv_block_exception_t *lv_block_exception; ++ uint lv_remap_ptr; ++ uint lv_remap_end; ++ uint lv_chunk_size; ++ uint lv_snapshot_minor; ++#ifdef __KERNEL__ ++ struct kiobuf *lv_iobuf; ++ struct kiobuf *lv_COW_table_iobuf; ++ struct rw_semaphore lv_lock; ++ struct list_head *lv_snapshot_hash_table; ++ uint32_t lv_snapshot_hash_table_size; ++ uint32_t lv_snapshot_hash_mask; ++ wait_queue_head_t lv_snapshot_wait; ++ int lv_snapshot_use_rate; ++ struct vg_v3 *vg; ++ ++ uint lv_allocated_snapshot_le; ++#else ++ char dummy[200]; ++#endif ++} lv_t; ++ ++/* disk */ ++typedef struct lv_disk_v3 { ++ uint8_t lv_name[NAME_LEN]; ++ uint8_t vg_name[NAME_LEN]; ++ uint32_t lv_access; ++ uint32_t lv_status; ++ uint32_t lv_open; /* HM */ ++ uint32_t lv_dev; /* HM */ ++ uint32_t lv_number; /* HM */ ++ uint32_t lv_mirror_copies; /* for future use */ ++ uint32_t lv_recovery; /* " */ ++ uint32_t lv_schedule; /* " */ ++ uint32_t lv_size; ++ uint32_t lv_snapshot_minor;/* minor number of original */ ++ uint16_t lv_chunk_size; /* chunk size of snapshot */ ++ uint16_t dummy; ++ uint32_t lv_allocated_le; ++ uint32_t lv_stripes; ++ uint32_t lv_stripesize; ++ uint32_t lv_badblock; /* for future use */ ++ uint32_t lv_allocation; ++ uint32_t lv_io_timeout; /* for future use */ ++ uint32_t lv_read_ahead; /* HM */ ++} lv_disk_t; ++ ++/* ++ * Structure Volume Group (VG) Version 1 ++ */ ++ ++/* core */ ++typedef struct vg_v3 { ++ char vg_name[NAME_LEN]; /* volume group name */ ++ uint vg_number; /* volume group number */ ++ uint vg_access; /* read/write */ ++ uint vg_status; /* active or not */ ++ uint lv_max; /* maximum logical volumes */ ++ uint lv_cur; /* current logical volumes */ ++ uint lv_open; /* open logical volumes */ ++ uint pv_max; /* maximum physical volumes */ ++ uint pv_cur; /* current physical volumes FU */ ++ uint pv_act; /* active physical volumes */ ++ uint dummy; /* was obsolete max_pe_per_pv */ ++ uint vgda; /* volume group descriptor arrays FU */ ++ uint pe_size; /* physical extent size in sectors */ ++ uint pe_total; /* total of physical extents */ ++ uint pe_allocated; /* allocated physical extents */ ++ uint pvg_total; /* physical volume groups FU */ ++ struct proc_dir_entry *proc; ++ pv_t *pv[ABS_MAX_PV + 1]; /* physical volume struct pointers */ ++ lv_t *lv[ABS_MAX_LV + 1]; /* logical volume struct pointers */ ++ char vg_uuid[UUID_LEN+1]; /* volume group UUID */ ++#ifdef __KERNEL__ ++ struct proc_dir_entry *vg_dir_pde; ++ struct proc_dir_entry *lv_subdir_pde; ++ struct proc_dir_entry *pv_subdir_pde; ++#else ++ char dummy1[200]; ++#endif ++} vg_t; ++ ++ ++/* disk */ ++typedef struct vg_disk_v2 { ++ uint8_t vg_uuid[UUID_LEN]; /* volume group UUID */ ++ uint8_t vg_name_dummy[NAME_LEN-UUID_LEN]; /* rest of v1 VG name */ ++ uint32_t vg_number; /* volume group number */ ++ uint32_t vg_access; /* read/write */ ++ uint32_t vg_status; /* active or not */ ++ uint32_t lv_max; /* maximum logical volumes */ ++ uint32_t lv_cur; /* current logical volumes */ ++ uint32_t lv_open; /* open logical volumes */ ++ uint32_t pv_max; /* maximum physical volumes */ ++ uint32_t pv_cur; /* current physical volumes FU */ ++ uint32_t pv_act; /* active physical volumes */ ++ uint32_t dummy; ++ uint32_t vgda; /* volume group descriptor arrays FU */ ++ uint32_t pe_size; /* physical extent size in sectors */ ++ uint32_t pe_total; /* total of physical extents */ ++ uint32_t pe_allocated; /* allocated physical extents */ ++ uint32_t pvg_total; /* physical volume groups FU */ ++} vg_disk_t; ++ ++ ++/* ++ * Request structures for ioctls ++ */ ++ ++/* Request structure PV_STATUS_BY_NAME... */ ++typedef struct { ++ char pv_name[NAME_LEN]; ++ pv_t *pv; ++} pv_status_req_t, pv_change_req_t; ++ ++/* Request structure PV_FLUSH */ ++typedef struct { ++ char pv_name[NAME_LEN]; ++ kdev_t pv_dev; ++} pv_flush_req_t; ++ ++ ++/* Request structure PE_MOVE */ ++typedef struct { ++ enum { ++ LOCK_PE, UNLOCK_PE ++ } lock; ++ struct { ++ kdev_t lv_dev; ++ kdev_t pv_dev; ++ uint32_t pv_offset; ++ } data; ++} pe_lock_req_t; ++ ++ ++/* Request structure LV_STATUS_BYNAME */ ++typedef struct { ++ char lv_name[NAME_LEN]; ++ lv_t *lv; ++} lv_status_byname_req_t, lv_req_t; ++ ++/* Request structure LV_STATUS_BYINDEX */ ++typedef struct { ++ uint32_t lv_index; ++ lv_t *lv; ++ /* Transfer size because user space and kernel space differ */ ++ ushort size; ++} lv_status_byindex_req_t; ++ ++/* Request structure LV_STATUS_BYDEV... */ ++typedef struct { ++ dev_t dev; ++ lv_t *lv; ++} lv_status_bydev_req_t; ++ ++ ++/* Request structure LV_SNAPSHOT_USE_RATE */ ++typedef struct { ++ int block; ++ int rate; ++} lv_snapshot_use_rate_req_t; ++ ++ ++ ++/* useful inlines */ ++static inline ulong round_up(ulong n, ulong size) { ++ size--; ++ return (n + size) & ~size; ++} ++ ++static inline ulong div_up(ulong n, ulong size) { ++ return round_up(n, size) / size; ++} ++ ++/* FIXME: nasty capital letters */ ++static int inline LVM_GET_COW_TABLE_CHUNKS_PER_PE(vg_t *vg, lv_t *lv) { ++ return vg->pe_size / lv->lv_chunk_size; ++} ++ ++static int inline LVM_GET_COW_TABLE_ENTRIES_PER_PE(vg_t *vg, lv_t *lv) { ++ ulong chunks = vg->pe_size / lv->lv_chunk_size; ++ ulong entry_size = sizeof(lv_COW_table_disk_t); ++ ulong chunk_size = lv->lv_chunk_size * SECTOR_SIZE; ++ ulong entries = (vg->pe_size * SECTOR_SIZE) / ++ (entry_size + chunk_size); ++ ++ if(chunks < 2) ++ return 0; ++ ++ for(; entries; entries--) ++ if((div_up(entries * entry_size, chunk_size) + entries) <= ++ chunks) ++ break; ++ ++ return entries; ++} ++ ++ ++#endif /* #ifndef _LVM_H_INCLUDE */ ++ +diff -Nur ./kernel-headers/linux/major.h ./kernel-headers/linux/major.h +--- ./kernel-headers/linux/major.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/major.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,198 @@ ++#ifndef _LINUX_MAJOR_H ++#define _LINUX_MAJOR_H ++ ++/* ++ * This file has definitions for major device numbers. ++ * For the device number assignments, see Documentation/devices.txt. ++ */ ++ ++/* limits */ ++ ++/* ++ * Important: Don't change this to 256. Major number 255 is and must be ++ * reserved for future expansion into a larger dev_t space. ++ */ ++#define MAX_CHRDEV 255 ++#define MAX_BLKDEV 255 ++ ++#define UNNAMED_MAJOR 0 ++#define MEM_MAJOR 1 ++#define RAMDISK_MAJOR 1 ++#define FLOPPY_MAJOR 2 ++#define PTY_MASTER_MAJOR 2 ++#define IDE0_MAJOR 3 ++#define PTY_SLAVE_MAJOR 3 ++#define HD_MAJOR IDE0_MAJOR ++#define TTY_MAJOR 4 ++#define TTYAUX_MAJOR 5 ++#define LP_MAJOR 6 ++#define VCS_MAJOR 7 ++#define LOOP_MAJOR 7 ++#define SCSI_DISK0_MAJOR 8 ++#define SCSI_TAPE_MAJOR 9 ++#define MD_MAJOR 9 ++#define MISC_MAJOR 10 ++#define SCSI_CDROM_MAJOR 11 ++#define MUX_MAJOR 11 /* PA-RISC only */ ++#define QIC02_TAPE_MAJOR 12 ++#define XT_DISK_MAJOR 13 ++#define SOUND_MAJOR 14 ++#define CDU31A_CDROM_MAJOR 15 ++#define JOYSTICK_MAJOR 15 ++#define GOLDSTAR_CDROM_MAJOR 16 ++#define OPTICS_CDROM_MAJOR 17 ++#define SANYO_CDROM_MAJOR 18 ++#define CYCLADES_MAJOR 19 ++#define CYCLADESAUX_MAJOR 20 ++#define MITSUMI_X_CDROM_MAJOR 20 ++#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */ ++#define SCSI_GENERIC_MAJOR 21 ++#define Z8530_MAJOR 34 ++#define DIGI_MAJOR 23 ++#define IDE1_MAJOR 22 ++#define DIGICU_MAJOR 22 ++#define MITSUMI_CDROM_MAJOR 23 ++#define CDU535_CDROM_MAJOR 24 ++#define STL_SERIALMAJOR 24 ++#define MATSUSHITA_CDROM_MAJOR 25 ++#define STL_CALLOUTMAJOR 25 ++#define MATSUSHITA_CDROM2_MAJOR 26 ++#define QIC117_TAPE_MAJOR 27 ++#define MATSUSHITA_CDROM3_MAJOR 27 ++#define MATSUSHITA_CDROM4_MAJOR 28 ++#define STL_SIOMEMMAJOR 28 ++#define ACSI_MAJOR 28 ++#define AZTECH_CDROM_MAJOR 29 ++#define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */ ++#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */ ++#define CM206_CDROM_MAJOR 32 ++#define IDE2_MAJOR 33 ++#define IDE3_MAJOR 34 ++#define XPRAM_MAJOR 35 /* expanded storage on S/390 = "slow ram" */ ++ /* proposed by Peter */ ++#define NETLINK_MAJOR 36 ++#define PS2ESDI_MAJOR 36 ++#define IDETAPE_MAJOR 37 ++#define Z2RAM_MAJOR 37 ++#define APBLOCK_MAJOR 38 /* AP1000 Block device */ ++#define DDV_MAJOR 39 /* AP1000 DDV block device */ ++#define NBD_MAJOR 43 /* Network block device */ ++#define RISCOM8_NORMAL_MAJOR 48 ++#define DAC960_MAJOR 48 /* 48..55 */ ++#define RISCOM8_CALLOUT_MAJOR 49 ++#define MKISS_MAJOR 55 ++#define DSP56K_MAJOR 55 /* DSP56001 processor device */ ++ ++#define IDE4_MAJOR 56 ++#define IDE5_MAJOR 57 ++ ++#define LVM_BLK_MAJOR 58 /* Logical Volume Manager */ ++ ++#define SCSI_DISK1_MAJOR 65 ++#define SCSI_DISK2_MAJOR 66 ++#define SCSI_DISK3_MAJOR 67 ++#define SCSI_DISK4_MAJOR 68 ++#define SCSI_DISK5_MAJOR 69 ++#define SCSI_DISK6_MAJOR 70 ++#define SCSI_DISK7_MAJOR 71 ++ ++ ++#define COMPAQ_SMART2_MAJOR 72 ++#define COMPAQ_SMART2_MAJOR1 73 ++#define COMPAQ_SMART2_MAJOR2 74 ++#define COMPAQ_SMART2_MAJOR3 75 ++#define COMPAQ_SMART2_MAJOR4 76 ++#define COMPAQ_SMART2_MAJOR5 77 ++#define COMPAQ_SMART2_MAJOR6 78 ++#define COMPAQ_SMART2_MAJOR7 79 ++ ++#define SPECIALIX_NORMAL_MAJOR 75 ++#define SPECIALIX_CALLOUT_MAJOR 76 ++ ++#define COMPAQ_CISS_MAJOR 104 ++#define COMPAQ_CISS_MAJOR1 105 ++#define COMPAQ_CISS_MAJOR2 106 ++#define COMPAQ_CISS_MAJOR3 107 ++#define COMPAQ_CISS_MAJOR4 108 ++#define COMPAQ_CISS_MAJOR5 109 ++#define COMPAQ_CISS_MAJOR6 110 ++#define COMPAQ_CISS_MAJOR7 111 ++ ++#define ATARAID_MAJOR 114 ++ ++#define DASD_MAJOR 94 /* Official assignations from Peter */ ++ ++#define MDISK_MAJOR 95 /* Official assignations from Peter */ ++ ++#define I2O_MAJOR 80 /* 80->87 */ ++ ++#define IDE6_MAJOR 88 ++#define IDE7_MAJOR 89 ++#define IDE8_MAJOR 90 ++#define IDE9_MAJOR 91 ++ ++#define UBD_MAJOR 98 ++ ++#define AURORA_MAJOR 79 ++ ++#define JSFD_MAJOR 99 ++ ++#define PHONE_MAJOR 100 ++ ++#define LVM_CHAR_MAJOR 109 /* Logical Volume Manager */ ++ ++#define UMEM_MAJOR 116 /* http://www.umem.com/ Battery Backed RAM */ ++ ++#define RTF_MAJOR 150 ++#define RAW_MAJOR 162 ++ ++#define USB_ACM_MAJOR 166 ++#define USB_ACM_AUX_MAJOR 167 ++#define USB_CHAR_MAJOR 180 ++ ++#define UNIX98_PTY_MASTER_MAJOR 128 ++#define UNIX98_PTY_MAJOR_COUNT 8 ++#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT) ++ ++#define VXVM_MAJOR 199 /* VERITAS volume i/o driver */ ++#define VXSPEC_MAJOR 200 /* VERITAS volume config driver */ ++#define VXDMP_MAJOR 201 /* VERITAS volume multipath driver */ ++ ++#define MSR_MAJOR 202 ++#define CPUID_MAJOR 203 ++ ++#define OSST_MAJOR 206 /* OnStream-SCx0 SCSI tape */ ++ ++#define IBM_TTY3270_MAJOR 227 /* Official allocations now */ ++#define IBM_FS3270_MAJOR 228 ++ ++/* ++ * Tests for SCSI devices. ++ */ ++ ++#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \ ++ ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR)) ++ ++#define SCSI_BLK_MAJOR(M) \ ++ (SCSI_DISK_MAJOR(M) \ ++ || (M) == SCSI_CDROM_MAJOR) ++ ++static __inline__ int scsi_blk_major(int m) { ++ return SCSI_BLK_MAJOR(m); ++} ++ ++/* ++ * Tests for IDE devices ++ */ ++#define IDE_DISK_MAJOR(M) ((M) == IDE0_MAJOR || (M) == IDE1_MAJOR || \ ++ (M) == IDE2_MAJOR || (M) == IDE3_MAJOR || \ ++ (M) == IDE4_MAJOR || (M) == IDE5_MAJOR || \ ++ (M) == IDE6_MAJOR || (M) == IDE7_MAJOR || \ ++ (M) == IDE8_MAJOR || (M) == IDE9_MAJOR) ++ ++static __inline__ int ide_blk_major(int m) ++{ ++ return IDE_DISK_MAJOR(m); ++} ++ ++#endif +diff -Nur ./kernel-headers/linux/unistd.h ./kernel-headers/linux/unistd.h +--- ./kernel-headers/linux/unistd.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./kernel-headers/linux/unistd.h 2004-07-10 02:59:14.000000000 +0200 +@@ -0,0 +1,11 @@ ++#ifndef _LINUX_UNISTD_H_ ++#define _LINUX_UNISTD_H_ ++ ++extern int errno; ++ ++/* ++ * Include machine specific syscallX macros ++ */ ++#include ++ ++#endif /* _LINUX_UNISTD_H_ */ diff --git a/packages/ia32/bootdisk/rules_make.patch b/packages/ia32/bootdisk/rules_make.patch new file mode 100644 index 0000000..1c4a529 --- /dev/null +++ b/packages/ia32/bootdisk/rules_make.patch @@ -0,0 +1,11 @@ +--- ./Rules.mak.orig 2004-07-10 04:03:10.000000000 +0200 ++++ ./Rules.mak 2004-07-10 04:04:27.000000000 +0200 +@@ -81,7 +81,7 @@ + #GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp") + + WARNINGS=-Wall -Wstrict-prototypes -Wshadow +-CFLAGS=-I$(TOPDIR)include ++CFLAGS=-I$(TOPDIR)include -I$(TOPDIR)kernel-headers + ARFLAGS=-r + + #-------------------------------------------------------- diff --git a/packages/ia32/lilo/kernel_2_6_x.patch b/packages/ia32/lilo/kernel_2_6_x.patch new file mode 100644 index 0000000..a141c73 --- /dev/null +++ b/packages/ia32/lilo/kernel_2_6_x.patch @@ -0,0 +1,4832 @@ +diff -Nur lilo-22.5.9-orig/Makefile lilo-22.5.9/Makefile +--- lilo-22.5.9-orig/Makefile 2004-07-10 02:41:41.000000000 +0200 ++++ lilo-22.5.9/Makefile 2004-07-10 03:10:28.000000000 +0200 +@@ -84,7 +84,7 @@ + LD86=ld86 -0 + NASM=nasm + +-CFLAGS=$(OPT) -Wall -g $(PCONFIG) ++CFLAGS=$(OPT) -Wall -g $(PCONFIG) -I./kernel-headers + LDFLAGS=#-Xlinker -qmagic + LIBS= + +diff -Nur lilo-22.5.9-orig/kernel-headers/asm/boot.h lilo-22.5.9/kernel-headers/asm/boot.h +--- lilo-22.5.9-orig/kernel-headers/asm/boot.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/asm/boot.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,15 @@ ++#ifndef _LINUX_BOOT_H ++#define _LINUX_BOOT_H ++ ++/* Don't touch these, unless you really know what you're doing. */ ++#define DEF_INITSEG 0x9000 ++#define DEF_SYSSEG 0x1000 ++#define DEF_SETUPSEG 0x9020 ++#define DEF_SYSSIZE 0x7F00 ++ ++/* Internal svga startup constants */ ++#define NORMAL_VGA 0xffff /* 80x25 mode */ ++#define EXTENDED_VGA 0xfffe /* 80x50 mode */ ++#define ASK_VGA 0xfffd /* ask for it at bootup */ ++ ++#endif +diff -Nur lilo-22.5.9-orig/kernel-headers/asm/ioctl.h lilo-22.5.9/kernel-headers/asm/ioctl.h +--- lilo-22.5.9-orig/kernel-headers/asm/ioctl.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/asm/ioctl.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,75 @@ ++/* $Id: kernel_2_6_x.patch,v 1.1 2004-07-21 08:58:08 hackbard Exp $ ++ * ++ * linux/ioctl.h for Linux by H.H. Bergman. ++ */ ++ ++#ifndef _ASMI386_IOCTL_H ++#define _ASMI386_IOCTL_H ++ ++/* ioctl command encoding: 32 bits total, command in lower 16 bits, ++ * size of the parameter structure in the lower 14 bits of the ++ * upper 16 bits. ++ * Encoding the size of the parameter structure in the ioctl request ++ * is useful for catching programs compiled with old versions ++ * and to avoid overwriting user space outside the user buffer area. ++ * The highest 2 bits are reserved for indicating the ``access mode''. ++ * NOTE: This limits the max parameter size to 16kB -1 ! ++ */ ++ ++/* ++ * The following is for compatibility across the various Linux ++ * platforms. The i386 ioctl numbering scheme doesn't really enforce ++ * a type field. De facto, however, the top 8 bits of the lower 16 ++ * bits are indeed used as a type field, so we might just as well make ++ * this explicit here. Please be sure to use the decoding macros ++ * below from now on. ++ */ ++#define _IOC_NRBITS 8 ++#define _IOC_TYPEBITS 8 ++#define _IOC_SIZEBITS 14 ++#define _IOC_DIRBITS 2 ++ ++#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) ++#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) ++#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) ++#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) ++ ++#define _IOC_NRSHIFT 0 ++#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) ++#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) ++#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) ++ ++/* ++ * Direction bits. ++ */ ++#define _IOC_NONE 0U ++#define _IOC_WRITE 1U ++#define _IOC_READ 2U ++ ++#define _IOC(dir,type,nr,size) \ ++ (((dir) << _IOC_DIRSHIFT) | \ ++ ((type) << _IOC_TYPESHIFT) | \ ++ ((nr) << _IOC_NRSHIFT) | \ ++ ((size) << _IOC_SIZESHIFT)) ++ ++/* used to create numbers */ ++#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) ++#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) ++#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) ++#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) ++ ++/* used to decode ioctl numbers.. */ ++#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) ++#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) ++#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) ++#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) ++ ++/* ...and for the drivers/sound files... */ ++ ++#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) ++#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) ++#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) ++#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) ++#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) ++ ++#endif /* _ASMI386_IOCTL_H */ +diff -Nur lilo-22.5.9-orig/kernel-headers/asm/page.h lilo-22.5.9/kernel-headers/asm/page.h +--- lilo-22.5.9-orig/kernel-headers/asm/page.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/asm/page.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,142 @@ ++#ifndef _I386_PAGE_H ++#define _I386_PAGE_H ++ ++/* PAGE_SHIFT determines the page size */ ++#define PAGE_SHIFT 12 ++#define PAGE_SIZE (1UL << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) ++ ++#ifdef __KERNEL__ ++#ifndef __ASSEMBLY__ ++ ++#include ++ ++#ifdef CONFIG_X86_USE_3DNOW ++ ++#include ++ ++#define clear_page(page) mmx_clear_page((void *)(page)) ++#define copy_page(to,from) mmx_copy_page(to,from) ++ ++#else ++ ++/* ++ * On older X86 processors its not a win to use MMX here it seems. ++ * Maybe the K6-III ? ++ */ ++ ++#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) ++#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) ++ ++#endif ++ ++#define clear_user_page(page, vaddr) clear_page(page) ++#define copy_user_page(to, from, vaddr) copy_page(to, from) ++ ++/* ++ * These are used to make use of C type-checking.. ++ */ ++#if CONFIG_X86_PAE ++typedef struct { unsigned long pte_low, pte_high; } pte_t; ++typedef struct { unsigned long long pmd; } pmd_t; ++typedef struct { unsigned long long pgd; } pgd_t; ++#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) ++#else ++typedef struct { unsigned long pte_low; } pte_t; ++typedef struct { unsigned long pmd; } pmd_t; ++typedef struct { unsigned long pgd; } pgd_t; ++#define pte_val(x) ((x).pte_low) ++#endif ++#define PTE_MASK PAGE_MASK ++ ++typedef struct { unsigned long pgprot; } pgprot_t; ++ ++#define pmd_val(x) ((x).pmd) ++#define pgd_val(x) ((x).pgd) ++#define pgprot_val(x) ((x).pgprot) ++ ++#define __pte(x) ((pte_t) { (x) } ) ++#define __pmd(x) ((pmd_t) { (x) } ) ++#define __pgd(x) ((pgd_t) { (x) } ) ++#define __pgprot(x) ((pgprot_t) { (x) } ) ++ ++#endif /* !__ASSEMBLY__ */ ++ ++/* to align the pointer to the (next) page boundary */ ++#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) ++ ++/* ++ * This handles the memory map.. We could make this a config ++ * option, but too many people screw it up, and too few need ++ * it. ++ * ++ * A __PAGE_OFFSET of 0xC0000000 means that the kernel has ++ * a virtual address space of one gigabyte, which limits the ++ * amount of physical memory you can use to about 950MB. ++ * ++ * If you want more physical memory than this then see the CONFIG_HIGHMEM4G ++ * and CONFIG_HIGHMEM64G options in the kernel configuration. ++ */ ++ ++#define __PAGE_OFFSET (0xC0000000) ++ ++/* ++ * This much address space is reserved for vmalloc() and iomap() ++ * as well as fixmap mappings. ++ */ ++#define __VMALLOC_RESERVE (128 << 20) ++ ++#ifndef __ASSEMBLY__ ++ ++/* ++ * Tell the user there is some problem. Beep too, so we can ++ * see^H^H^Hhear bugs in early bootup as well! ++ * The offending file and line are encoded after the "officially ++ * undefined" opcode for parsing in the trap handler. ++ */ ++ ++#if 1 /* Set to zero for a slightly smaller kernel */ ++#define BUG() \ ++ __asm__ __volatile__( "ud2\n" \ ++ "\t.word %c0\n" \ ++ "\t.long %c1\n" \ ++ : : "i" (__LINE__), "i" (__FILE__)) ++#else ++#define BUG() __asm__ __volatile__("ud2\n") ++#endif ++ ++#define PAGE_BUG(page) do { \ ++ BUG(); \ ++} while (0) ++ ++/* Pure 2^n version of get_order */ ++static __inline__ int get_order(unsigned long size) ++{ ++ int order; ++ ++ size = (size-1) >> (PAGE_SHIFT-1); ++ order = -1; ++ do { ++ size >>= 1; ++ order++; ++ } while (size); ++ return order; ++} ++ ++#endif /* __ASSEMBLY__ */ ++ ++#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) ++#define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) ++#define __MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) ++#define MAXMEM ((unsigned long)(-PAGE_OFFSET-VMALLOC_RESERVE)) ++#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) ++#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) ++#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT)) ++#define VALID_PAGE(page) ((page - mem_map) < max_mapnr) ++ ++#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ ++ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _I386_PAGE_H */ +diff -Nur lilo-22.5.9-orig/kernel-headers/asm/types.h lilo-22.5.9/kernel-headers/asm/types.h +--- lilo-22.5.9-orig/kernel-headers/asm/types.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/asm/types.h 2004-07-10 02:56:48.000000000 +0200 +@@ -0,0 +1,57 @@ ++#ifndef _I386_TYPES_H ++#define _I386_TYPES_H ++ ++typedef unsigned short umode_t; ++ ++/* ++ * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the ++ * header files exported to user space ++ */ ++ ++typedef __signed__ char __s8; ++typedef unsigned char __u8; ++ ++typedef __signed__ short __s16; ++typedef unsigned short __u16; ++ ++typedef __signed__ int __s32; ++typedef unsigned int __u32; ++ ++#if defined(__GNUC__) && !defined(__STRICT_ANSI__) ++typedef __signed__ long long __s64; ++typedef unsigned long long __u64; ++#endif ++ ++/* ++ * These aren't exported outside the kernel to avoid name space clashes ++ */ ++#ifdef __KERNEL__ ++ ++#include ++ ++typedef signed char s8; ++typedef unsigned char u8; ++ ++typedef signed short s16; ++typedef unsigned short u16; ++ ++typedef signed int s32; ++typedef unsigned int u32; ++ ++typedef signed long long s64; ++typedef unsigned long long u64; ++ ++#define BITS_PER_LONG 32 ++ ++/* DMA addresses come in generic and 64-bit flavours. */ ++ ++#ifdef CONFIG_HIGHMEM64G ++typedef u64 dma_addr_t; ++#else ++typedef u32 dma_addr_t; ++#endif ++typedef u64 dma64_addr_t; ++ ++#endif /* __KERNEL__ */ ++ ++#endif +diff -Nur lilo-22.5.9-orig/kernel-headers/asm/unistd.h lilo-22.5.9/kernel-headers/asm/unistd.h +--- lilo-22.5.9-orig/kernel-headers/asm/unistd.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/asm/unistd.h 2004-07-10 02:55:27.000000000 +0200 +@@ -0,0 +1,386 @@ ++#ifndef _ASM_I386_UNISTD_H_ ++#define _ASM_I386_UNISTD_H_ ++ ++/* ++ * This file contains the system call numbers. ++ */ ++ ++#define __NR_exit 1 ++#define __NR_fork 2 ++#define __NR_read 3 ++#define __NR_write 4 ++#define __NR_open 5 ++#define __NR_close 6 ++#define __NR_waitpid 7 ++#define __NR_creat 8 ++#define __NR_link 9 ++#define __NR_unlink 10 ++#define __NR_execve 11 ++#define __NR_chdir 12 ++#define __NR_time 13 ++#define __NR_mknod 14 ++#define __NR_chmod 15 ++#define __NR_lchown 16 ++#define __NR_break 17 ++#define __NR_oldstat 18 ++#define __NR_lseek 19 ++#define __NR_getpid 20 ++#define __NR_mount 21 ++#define __NR_umount 22 ++#define __NR_setuid 23 ++#define __NR_getuid 24 ++#define __NR_stime 25 ++#define __NR_ptrace 26 ++#define __NR_alarm 27 ++#define __NR_oldfstat 28 ++#define __NR_pause 29 ++#define __NR_utime 30 ++#define __NR_stty 31 ++#define __NR_gtty 32 ++#define __NR_access 33 ++#define __NR_nice 34 ++#define __NR_ftime 35 ++#define __NR_sync 36 ++#define __NR_kill 37 ++#define __NR_rename 38 ++#define __NR_mkdir 39 ++#define __NR_rmdir 40 ++#define __NR_dup 41 ++#define __NR_pipe 42 ++#define __NR_times 43 ++#define __NR_prof 44 ++#define __NR_brk 45 ++#define __NR_setgid 46 ++#define __NR_getgid 47 ++#define __NR_signal 48 ++#define __NR_geteuid 49 ++#define __NR_getegid 50 ++#define __NR_acct 51 ++#define __NR_umount2 52 ++#define __NR_lock 53 ++#define __NR_ioctl 54 ++#define __NR_fcntl 55 ++#define __NR_mpx 56 ++#define __NR_setpgid 57 ++#define __NR_ulimit 58 ++#define __NR_oldolduname 59 ++#define __NR_umask 60 ++#define __NR_chroot 61 ++#define __NR_ustat 62 ++#define __NR_dup2 63 ++#define __NR_getppid 64 ++#define __NR_getpgrp 65 ++#define __NR_setsid 66 ++#define __NR_sigaction 67 ++#define __NR_sgetmask 68 ++#define __NR_ssetmask 69 ++#define __NR_setreuid 70 ++#define __NR_setregid 71 ++#define __NR_sigsuspend 72 ++#define __NR_sigpending 73 ++#define __NR_sethostname 74 ++#define __NR_setrlimit 75 ++#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ ++#define __NR_getrusage 77 ++#define __NR_gettimeofday 78 ++#define __NR_settimeofday 79 ++#define __NR_getgroups 80 ++#define __NR_setgroups 81 ++#define __NR_select 82 ++#define __NR_symlink 83 ++#define __NR_oldlstat 84 ++#define __NR_readlink 85 ++#define __NR_uselib 86 ++#define __NR_swapon 87 ++#define __NR_reboot 88 ++#define __NR_readdir 89 ++#define __NR_mmap 90 ++#define __NR_munmap 91 ++#define __NR_truncate 92 ++#define __NR_ftruncate 93 ++#define __NR_fchmod 94 ++#define __NR_fchown 95 ++#define __NR_getpriority 96 ++#define __NR_setpriority 97 ++#define __NR_profil 98 ++#define __NR_statfs 99 ++#define __NR_fstatfs 100 ++#define __NR_ioperm 101 ++#define __NR_socketcall 102 ++#define __NR_syslog 103 ++#define __NR_setitimer 104 ++#define __NR_getitimer 105 ++#define __NR_stat 106 ++#define __NR_lstat 107 ++#define __NR_fstat 108 ++#define __NR_olduname 109 ++#define __NR_iopl 110 ++#define __NR_vhangup 111 ++#define __NR_idle 112 ++#define __NR_vm86old 113 ++#define __NR_wait4 114 ++#define __NR_swapoff 115 ++#define __NR_sysinfo 116 ++#define __NR_ipc 117 ++#define __NR_fsync 118 ++#define __NR_sigreturn 119 ++#define __NR_clone 120 ++#define __NR_setdomainname 121 ++#define __NR_uname 122 ++#define __NR_modify_ldt 123 ++#define __NR_adjtimex 124 ++#define __NR_mprotect 125 ++#define __NR_sigprocmask 126 ++#define __NR_create_module 127 ++#define __NR_init_module 128 ++#define __NR_delete_module 129 ++#define __NR_get_kernel_syms 130 ++#define __NR_quotactl 131 ++#define __NR_getpgid 132 ++#define __NR_fchdir 133 ++#define __NR_bdflush 134 ++#define __NR_sysfs 135 ++#define __NR_personality 136 ++#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ ++#define __NR_setfsuid 138 ++#define __NR_setfsgid 139 ++#define __NR__llseek 140 ++#define __NR_getdents 141 ++#define __NR__newselect 142 ++#define __NR_flock 143 ++#define __NR_msync 144 ++#define __NR_readv 145 ++#define __NR_writev 146 ++#define __NR_getsid 147 ++#define __NR_fdatasync 148 ++#define __NR__sysctl 149 ++#define __NR_mlock 150 ++#define __NR_munlock 151 ++#define __NR_mlockall 152 ++#define __NR_munlockall 153 ++#define __NR_sched_setparam 154 ++#define __NR_sched_getparam 155 ++#define __NR_sched_setscheduler 156 ++#define __NR_sched_getscheduler 157 ++#define __NR_sched_yield 158 ++#define __NR_sched_get_priority_max 159 ++#define __NR_sched_get_priority_min 160 ++#define __NR_sched_rr_get_interval 161 ++#define __NR_nanosleep 162 ++#define __NR_mremap 163 ++#define __NR_setresuid 164 ++#define __NR_getresuid 165 ++#define __NR_vm86 166 ++#define __NR_query_module 167 ++#define __NR_poll 168 ++#define __NR_nfsservctl 169 ++#define __NR_setresgid 170 ++#define __NR_getresgid 171 ++#define __NR_prctl 172 ++#define __NR_rt_sigreturn 173 ++#define __NR_rt_sigaction 174 ++#define __NR_rt_sigprocmask 175 ++#define __NR_rt_sigpending 176 ++#define __NR_rt_sigtimedwait 177 ++#define __NR_rt_sigqueueinfo 178 ++#define __NR_rt_sigsuspend 179 ++#define __NR_pread 180 ++#define __NR_pwrite 181 ++#define __NR_chown 182 ++#define __NR_getcwd 183 ++#define __NR_capget 184 ++#define __NR_capset 185 ++#define __NR_sigaltstack 186 ++#define __NR_sendfile 187 ++#define __NR_getpmsg 188 /* some people actually want streams */ ++#define __NR_putpmsg 189 /* some people actually want streams */ ++#define __NR_vfork 190 ++#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ ++#define __NR_mmap2 192 ++#define __NR_truncate64 193 ++#define __NR_ftruncate64 194 ++#define __NR_stat64 195 ++#define __NR_lstat64 196 ++#define __NR_fstat64 197 ++#define __NR_lchown32 198 ++#define __NR_getuid32 199 ++#define __NR_getgid32 200 ++#define __NR_geteuid32 201 ++#define __NR_getegid32 202 ++#define __NR_setreuid32 203 ++#define __NR_setregid32 204 ++#define __NR_getgroups32 205 ++#define __NR_setgroups32 206 ++#define __NR_fchown32 207 ++#define __NR_setresuid32 208 ++#define __NR_getresuid32 209 ++#define __NR_setresgid32 210 ++#define __NR_getresgid32 211 ++#define __NR_chown32 212 ++#define __NR_setuid32 213 ++#define __NR_setgid32 214 ++#define __NR_setfsuid32 215 ++#define __NR_setfsgid32 216 ++#define __NR_pivot_root 217 ++#define __NR_mincore 218 ++#define __NR_madvise 219 ++#define __NR_madvise1 219 /* delete when C lib stub is removed */ ++#define __NR_getdents64 220 ++#define __NR_fcntl64 221 ++#define __NR_security 223 /* syscall for security modules */ ++#define __NR_gettid 224 ++#define __NR_readahead 225 ++#define __NR_setxattr 226 ++#define __NR_lsetxattr 227 ++#define __NR_fsetxattr 228 ++#define __NR_getxattr 229 ++#define __NR_lgetxattr 230 ++#define __NR_fgetxattr 231 ++#define __NR_listxattr 232 ++#define __NR_llistxattr 233 ++#define __NR_flistxattr 234 ++#define __NR_removexattr 235 ++#define __NR_lremovexattr 236 ++#define __NR_fremovexattr 237 ++#define __NR_tkill 238 ++#define __NR_sendfile64 239 ++#define __NR_futex 240 ++#define __NR_sched_setaffinity 241 ++#define __NR_sched_getaffinity 242 ++#define __NR_set_thread_area 243 ++#define __NR_get_thread_area 244 ++#define __NR_io_setup 245 ++#define __NR_io_destroy 246 ++#define __NR_io_getevents 247 ++#define __NR_io_submit 248 ++#define __NR_io_cancel 249 ++#define __NR_alloc_hugepages 250 ++#define __NR_free_hugepages 251 ++#define __NR_exit_group 252 ++ ++/* user-visible error numbers are in the range -1 - -124: see */ ++ ++#define __syscall_return(type, res) \ ++do { \ ++ if ((unsigned long)(res) >= (unsigned long)(-125)) { \ ++ errno = -(res); \ ++ res = -1; \ ++ } \ ++ return (type) (res); \ ++} while (0) ++ ++/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ ++#define _syscall0(type,name) \ ++type name(void) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name)); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall1(type,name,type1,arg1) \ ++type name(type1 arg1) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall2(type,name,type1,arg1,type2,arg2) \ ++type name(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ ++type name(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++__asm__ volatile ("int $0x80" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ ++__syscall_return(type,__res); \ ++} ++ ++#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5,type6,arg6) \ ++type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ ++{ \ ++long __res; \ ++__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x80 ; pop %%ebp" \ ++ : "=a" (__res) \ ++ : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ ++ "0" ((long)(arg6))); \ ++__syscall_return(type,__res); \ ++} ++ ++#ifdef __KERNEL_SYSCALLS__ ++ ++/* ++ * we need this inline - forking from kernel space will result ++ * in NO COPY ON WRITE (!!!), until an execve is executed. This ++ * is no problem, but for the stack. This is handled by not letting ++ * main() use the stack at all after fork(). Thus, no function ++ * calls - which means inline code for fork too, as otherwise we ++ * would use the stack upon exit from 'fork()'. ++ * ++ * Actually only pause and fork are needed inline, so that there ++ * won't be any messing with the stack from main(), but we define ++ * some others too. ++ */ ++#define __NR__exit __NR_exit ++static inline _syscall0(int,pause) ++static inline _syscall0(int,sync) ++static inline _syscall0(pid_t,setsid) ++static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) ++static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) ++static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) ++static inline _syscall1(int,dup,int,fd) ++static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) ++static inline _syscall3(int,open,const char *,file,int,flag,int,mode) ++static inline _syscall1(int,close,int,fd) ++static inline _syscall1(int,_exit,int,exitcode) ++static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) ++static inline _syscall1(int,delete_module,const char *,name) ++ ++static inline pid_t wait(int * wait_stat) ++{ ++ return waitpid(-1,wait_stat,0); ++} ++ ++#endif ++ ++#endif /* _ASM_I386_UNISTD_H_ */ +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/config.h lilo-22.5.9/kernel-headers/linux/config.h +--- lilo-22.5.9-orig/kernel-headers/linux/config.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/config.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,6 @@ ++#ifndef _LINUX_CONFIG_H ++#define _LINUX_CONFIG_H ++ ++#include ++ ++#endif +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/fd.h lilo-22.5.9/kernel-headers/linux/fd.h +--- lilo-22.5.9-orig/kernel-headers/linux/fd.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/fd.h 2004-07-10 02:59:14.000000000 +0200 +@@ -0,0 +1,372 @@ ++#ifndef _LINUX_FD_H ++#define _LINUX_FD_H ++ ++#include ++ ++/* New file layout: Now the ioctl definitions immediately follow the ++ * definitions of the structures that they use */ ++ ++/* ++ * Geometry ++ */ ++struct floppy_struct { ++ unsigned int size, /* nr of sectors total */ ++ sect, /* sectors per track */ ++ head, /* nr of heads */ ++ track, /* nr of tracks */ ++ stretch; /* !=0 means double track steps */ ++#define FD_STRETCH 1 ++#define FD_SWAPSIDES 2 ++ ++ unsigned char gap, /* gap1 size */ ++ ++ rate, /* data rate. |= 0x40 for perpendicular */ ++#define FD_2M 0x4 ++#define FD_SIZECODEMASK 0x38 ++#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8) ++#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \ ++ 512 : 128 << FD_SIZECODE(floppy) ) ++#define FD_PERP 0x40 ++ ++ spec1, /* stepping rate, head unload time */ ++ fmt_gap; /* gap2 size */ ++ const char * name; /* used only for predefined formats */ ++}; ++ ++ ++/* commands needing write access have 0x40 set */ ++/* commands needing super user access have 0x80 set */ ++ ++#define FDCLRPRM _IO(2, 0x41) ++/* clear user-defined parameters */ ++ ++#define FDSETPRM _IOW(2, 0x42, struct floppy_struct) ++#define FDSETMEDIAPRM FDSETPRM ++/* set user-defined parameters for current media */ ++ ++#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct) ++#define FDGETPRM _IOR(2, 0x04, struct floppy_struct) ++#define FDDEFMEDIAPRM FDDEFPRM ++#define FDGETMEDIAPRM FDGETPRM ++/* set/get disk parameters */ ++ ++ ++#define FDMSGON _IO(2,0x45) ++#define FDMSGOFF _IO(2,0x46) ++/* issue/don't issue kernel messages on media type change */ ++ ++ ++/* ++ * Formatting (obsolete) ++ */ ++#define FD_FILL_BYTE 0xF6 /* format fill byte. */ ++ ++struct format_descr { ++ unsigned int device,head,track; ++}; ++ ++#define FDFMTBEG _IO(2,0x47) ++/* begin formatting a disk */ ++#define FDFMTTRK _IOW(2,0x48, struct format_descr) ++/* format the specified track */ ++#define FDFMTEND _IO(2,0x49) ++/* end formatting a disk */ ++ ++ ++/* ++ * Error thresholds ++ */ ++struct floppy_max_errors { ++ unsigned int ++ abort, /* number of errors to be reached before aborting */ ++ read_track, /* maximal number of errors permitted to read an ++ * entire track at once */ ++ reset, /* maximal number of errors before a reset is tried */ ++ recal, /* maximal number of errors before a recalibrate is ++ * tried */ ++ ++ /* ++ * Threshold for reporting FDC errors to the console. ++ * Setting this to zero may flood your screen when using ++ * ultra cheap floppies ;-) ++ */ ++ reporting; ++ ++}; ++ ++#define FDSETEMSGTRESH _IO(2,0x4a) ++/* set fdc error reporting threshold */ ++ ++#define FDFLUSH _IO(2,0x4b) ++/* flush buffers for media; either for verifying media, or for ++ * handling a media change without closing the file descriptor */ ++ ++#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors) ++#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors) ++/* set/get abortion and read_track threshold. See also floppy_drive_params ++ * structure */ ++ ++ ++typedef char floppy_drive_name[16]; ++#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name) ++/* get drive type: 5 1/4 or 3 1/2 */ ++ ++ ++/* ++ * Drive parameters (user modifiable) ++ */ ++struct floppy_drive_params { ++ signed char cmos; /* CMOS type */ ++ ++ /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms ++ * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA). ++ */ ++ unsigned long max_dtr; /* Step rate, usec */ ++ unsigned long hlt; /* Head load/settle time, msec */ ++ unsigned long hut; /* Head unload time (remnant of ++ * 8" drives) */ ++ unsigned long srt; /* Step rate, usec */ ++ ++ unsigned long spinup; /* time needed for spinup (expressed ++ * in jiffies) */ ++ unsigned long spindown; /* timeout needed for spindown */ ++ unsigned char spindown_offset; /* decides in which position the disk ++ * will stop */ ++ unsigned char select_delay; /* delay to wait after select */ ++ unsigned char rps; /* rotations per second */ ++ unsigned char tracks; /* maximum number of tracks */ ++ unsigned long timeout; /* timeout for interrupt requests */ ++ ++ unsigned char interleave_sect; /* if there are more sectors, use ++ * interleave */ ++ ++ struct floppy_max_errors max_errors; ++ ++ char flags; /* various flags, including ftd_msg */ ++/* ++ * Announce successful media type detection and media information loss after ++ * disk changes. ++ * Also used to enable/disable printing of overrun warnings. ++ */ ++ ++#define FTD_MSG 0x10 ++#define FD_BROKEN_DCL 0x20 ++#define FD_DEBUG 0x02 ++#define FD_SILENT_DCL_CLEAR 0x4 ++#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware ++ considerations */ ++ ++ char read_track; /* use readtrack during probing? */ ++ ++/* ++ * Auto-detection. Each drive type has eight formats which are ++ * used in succession to try to read the disk. If the FDC cannot lock onto ++ * the disk, the next format is tried. This uses the variable 'probing'. ++ */ ++ short autodetect[8]; /* autodetected formats */ ++ ++ int checkfreq; /* how often should the drive be checked for disk ++ * changes */ ++ int native_format; /* native format of this drive */ ++}; ++ ++enum { ++ FD_NEED_TWADDLE_BIT, /* more magic */ ++ FD_VERIFY_BIT, /* inquire for write protection */ ++ FD_DISK_NEWCHANGE_BIT, /* change detected, and no action undertaken yet ++ * to clear media change status */ ++ FD_UNUSED_BIT, ++ FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */ ++ FD_DISK_WRITABLE_BIT /* disk is writable */ ++}; ++ ++#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params) ++#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params) ++/* set/get drive parameters */ ++ ++ ++/* ++ * Current drive state (not directly modifiable by user, readonly) ++ */ ++struct floppy_drive_struct { ++ unsigned long flags; ++/* values for these flags */ ++#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT) ++#define FD_VERIFY (1 << FD_VERIFY_BIT) ++#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT) ++#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT) ++#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT) ++ ++ unsigned long spinup_date; ++ unsigned long select_date; ++ unsigned long first_read_date; ++ short probed_format; ++ short track; /* current track */ ++ short maxblock; /* id of highest block read */ ++ short maxtrack; /* id of highest half track read */ ++ int generation; /* how many diskchanges? */ ++ ++/* ++ * (User-provided) media information is _not_ discarded after a media change ++ * if the corresponding keep_data flag is non-zero. Positive values are ++ * decremented after each probe. ++ */ ++ int keep_data; ++ ++ /* Prevent "aliased" accesses. */ ++ int fd_ref; ++ int fd_device; ++ unsigned long last_checked; /* when was the drive last checked for a disk ++ * change? */ ++ ++ char *dmabuf; ++ int bufblocks; ++}; ++ ++#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct) ++#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct) ++/* get drive state: GET returns the cached state, POLL polls for new state */ ++ ++ ++/* ++ * reset FDC ++ */ ++enum reset_mode { ++ FD_RESET_IF_NEEDED, /* reset only if the reset flags is set */ ++ FD_RESET_IF_RAWCMD, /* obsolete */ ++ FD_RESET_ALWAYS /* reset always */ ++}; ++#define FDRESET _IO(2, 0x54) ++ ++ ++/* ++ * FDC state ++ */ ++struct floppy_fdc_state { ++ int spec1; /* spec1 value last used */ ++ int spec2; /* spec2 value last used */ ++ int dtr; ++ unsigned char version; /* FDC version code */ ++ unsigned char dor; ++ unsigned long address; /* io address */ ++ unsigned int rawcmd:2; ++ unsigned int reset:1; ++ unsigned int need_configure:1; ++ unsigned int perp_mode:2; ++ unsigned int has_fifo:1; ++ unsigned int driver_version; /* version code for floppy driver */ ++#define FD_DRIVER_VERSION 0x100 ++/* user programs using the floppy API should use floppy_fdc_state to ++ * get the version number of the floppy driver that they are running ++ * on. If this version number is bigger than the one compiled into the ++ * user program (the FD_DRIVER_VERSION define), it should be prepared ++ * to bigger structures ++ */ ++ ++ unsigned char track[4]; ++ /* Position of the heads of the 4 units attached to this FDC, ++ * as stored on the FDC. In the future, the position as stored ++ * on the FDC might not agree with the actual physical ++ * position of these drive heads. By allowing such ++ * disagreement, it will be possible to reset the FDC without ++ * incurring the expensive cost of repositioning all heads. ++ * Right now, these positions are hard wired to 0. */ ++ ++}; ++ ++#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state) ++ ++ ++/* ++ * Asynchronous Write error tracking ++ */ ++struct floppy_write_errors { ++ /* Write error logging. ++ * ++ * These fields can be cleared with the FDWERRORCLR ioctl. ++ * Only writes that were attempted but failed due to a physical media ++ * error are logged. write(2) calls that fail and return an error code ++ * to the user process are not counted. ++ */ ++ ++ unsigned int write_errors; /* number of physical write errors ++ * encountered */ ++ ++ /* position of first and last write errors */ ++ unsigned long first_error_sector; ++ int first_error_generation; ++ unsigned long last_error_sector; ++ int last_error_generation; ++ ++ unsigned int badness; /* highest retry count for a read or write ++ * operation */ ++}; ++ ++#define FDWERRORCLR _IO(2, 0x56) ++/* clear write error and badness information */ ++#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors) ++/* get write error and badness information */ ++ ++ ++/* ++ * Raw commands ++ */ ++/* new interface flag: now we can do them in batches */ ++#define FDHAVEBATCHEDRAWCMD ++ ++struct floppy_raw_cmd { ++ unsigned int flags; ++#define FD_RAW_READ 1 ++#define FD_RAW_WRITE 2 ++#define FD_RAW_NO_MOTOR 4 ++#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */ ++#define FD_RAW_INTR 8 /* wait for an interrupt */ ++#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */ ++#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command ++ * completion */ ++#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */ ++#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */ ++ ++/* more "in" flags */ ++#define FD_RAW_MORE 0x100 /* more records follow */ ++#define FD_RAW_STOP_IF_FAILURE 0x200 /* stop if we encounter a failure */ ++#define FD_RAW_STOP_IF_SUCCESS 0x400 /* stop if command successful */ ++#define FD_RAW_SOFTFAILURE 0x800 /* consider the return value for failure ++ * detection too */ ++ ++/* more "out" flags */ ++#define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */ ++#define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */ ++ ++ void *data; ++ char *kernel_data; /* location of data buffer in the kernel */ ++ struct floppy_raw_cmd *next; /* used for chaining of raw cmd's ++ * within the kernel */ ++ long length; /* in: length of dma transfer. out: remaining bytes */ ++ long phys_length; /* physical length, if different from dma length */ ++ int buffer_length; /* length of allocated buffer */ ++ ++ unsigned char rate; ++ unsigned char cmd_count; ++ unsigned char cmd[16]; ++ unsigned char reply_count; ++ unsigned char reply[16]; ++ int track; ++ int resultcode; ++ ++ int reserved1; ++ int reserved2; ++}; ++ ++#define FDRAWCMD _IO(2, 0x58) ++/* send a raw command to the fdc. Structure size not included, because of ++ * batches */ ++ ++#define FDTWADDLE _IO(2, 0x59) ++/* flicker motor-on bit before reading a sector. Experimental */ ++ ++ ++#define FDEJECT _IO(2, 0x5a) ++/* eject the disk */ ++ ++#endif +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/fs.h lilo-22.5.9/kernel-headers/linux/fs.h +--- lilo-22.5.9-orig/kernel-headers/linux/fs.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/fs.h 2004-07-10 02:59:14.000000000 +0200 +@@ -0,0 +1,1675 @@ ++#ifndef _LINUX_FS_H ++#define _LINUX_FS_H ++ ++/* ++ * This file has definitions for some important file table ++ * structures etc. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++struct poll_table_struct; ++ ++ ++/* ++ * It's silly to have NR_OPEN bigger than NR_FILE, but you can change ++ * the file limit at runtime and only root can increase the per-process ++ * nr_file rlimit, so it's safe to set up a ridiculously high absolute ++ * upper limit on files-per-process. ++ * ++ * Some programs (notably those using select()) may have to be ++ * recompiled to take full advantage of the new limits.. ++ */ ++ ++/* Fixed constants first: */ ++#undef NR_OPEN ++#define NR_OPEN (1024*1024) /* Absolute upper limit on fd num */ ++#define INR_OPEN 1024 /* Initial setting for nfile rlimits */ ++ ++#define BLOCK_SIZE_BITS 10 ++#define BLOCK_SIZE (1<i_sb->s_flags & (flg)) ++ ++#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) ++#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC)) ++#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) ++ ++#define IS_QUOTAINIT(inode) ((inode)->i_flags & S_QUOTA) ++#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) ++#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) ++#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) ++#define IS_NOATIME(inode) (__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME)) ++#define IS_NODIRATIME(inode) __IS_FLG(inode, MS_NODIRATIME) ++ ++#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) ++ ++/* the read-only stuff doesn't really belong here, but any other place is ++ probably as bad and I don't want to create yet another include file. */ ++ ++#define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */ ++#define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */ ++#define BLKRRPART _IO(0x12,95) /* re-read partition table */ ++#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ ++#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ ++#define BLKRASET _IO(0x12,98) /* Set read ahead for block device */ ++#define BLKRAGET _IO(0x12,99) /* get current read ahead setting */ ++#define BLKFRASET _IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ ++#define BLKFRAGET _IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */ ++#define BLKSECTSET _IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */ ++#define BLKSECTGET _IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */ ++#define BLKSSZGET _IO(0x12,104)/* get block device sector size */ ++#if 0 ++#define BLKPG _IO(0x12,105)/* See blkpg.h */ ++#define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))/* elevator get */ ++#define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))/* elevator set */ ++/* This was here just to show that the number is taken - ++ probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */ ++#endif ++/* A jump here: 108-111 have been used for various private purposes. */ ++#define BLKBSZGET _IOR(0x12,112,sizeof(int)) ++#define BLKBSZSET _IOW(0x12,113,sizeof(int)) ++#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */ ++ ++#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ ++#define FIBMAP _IO(0x00,1) /* bmap access */ ++#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ ++ ++#ifdef __KERNEL__ ++ ++#include ++#include ++ ++extern void update_atime (struct inode *); ++extern void update_mctime (struct inode *); ++#define UPDATE_ATIME(inode) update_atime (inode) ++ ++extern void buffer_init(unsigned long); ++extern void inode_init(unsigned long); ++extern void mnt_init(unsigned long); ++extern void files_init(unsigned long mempages); ++ ++/* bh state bits */ ++enum bh_state_bits { ++ BH_Uptodate, /* 1 if the buffer contains valid data */ ++ BH_Dirty, /* 1 if the buffer is dirty */ ++ BH_Lock, /* 1 if the buffer is locked */ ++ BH_Req, /* 0 if the buffer has been invalidated */ ++ BH_Mapped, /* 1 if the buffer has a disk mapping */ ++ BH_New, /* 1 if the buffer is new and not yet written out */ ++ BH_Async, /* 1 if the buffer is under end_buffer_io_async I/O */ ++ BH_Wait_IO, /* 1 if we should write out this buffer */ ++ BH_Launder, /* 1 if we can throttle on this buffer */ ++ BH_Attached, /* 1 if b_inode_buffers is linked into a list */ ++ BH_JBD, /* 1 if it has an attached journal_head */ ++ BH_Sync, /* 1 if the buffer is a sync read */ ++ ++ BH_PrivateStart,/* not a state bit, but the first bit available ++ * for private allocation by other entities ++ */ ++}; ++ ++#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512) ++ ++/* ++ * Try to keep the most commonly used fields in single cache lines (16 ++ * bytes) to improve performance. This ordering should be ++ * particularly beneficial on 32-bit processors. ++ * ++ * We use the first 16 bytes for the data which is used in searches ++ * over the block hash lists (ie. getblk() and friends). ++ * ++ * The second 16 bytes we use for lru buffer scans, as used by ++ * sync_buffers() and refill_freelist(). -- sct ++ */ ++struct buffer_head { ++ /* First cache line: */ ++ struct buffer_head *b_next; /* Hash queue list */ ++ unsigned long b_blocknr; /* block number */ ++ unsigned short b_size; /* block size */ ++ unsigned short b_list; /* List that this buffer appears */ ++ kdev_t b_dev; /* device (B_FREE = free) */ ++ ++ atomic_t b_count; /* users using this block */ ++ kdev_t b_rdev; /* Real device */ ++ unsigned long b_state; /* buffer state bitmap (see above) */ ++ unsigned long b_flushtime; /* Time when (dirty) buffer should be written */ ++ ++ struct buffer_head *b_next_free;/* lru/free list linkage */ ++ struct buffer_head *b_prev_free;/* doubly linked list of buffers */ ++ struct buffer_head *b_this_page;/* circular list of buffers in one page */ ++ struct buffer_head *b_reqnext; /* request queue */ ++ ++ struct buffer_head **b_pprev; /* doubly linked list of hash-queue */ ++ char * b_data; /* pointer to data block */ ++ struct page *b_page; /* the page this bh is mapped to */ ++ void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */ ++ void *b_private; /* reserved for b_end_io */ ++ ++ unsigned long b_rsector; /* Real buffer location on disk */ ++ wait_queue_head_t b_wait; ++ ++ struct list_head b_inode_buffers; /* doubly linked list of inode dirty buffers */ ++}; ++ ++typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate); ++void init_buffer(struct buffer_head *, bh_end_io_t *, void *); ++ ++#define __buffer_state(bh, state) (((bh)->b_state & (1UL << BH_##state)) != 0) ++ ++#define buffer_uptodate(bh) __buffer_state(bh,Uptodate) ++#define buffer_dirty(bh) __buffer_state(bh,Dirty) ++#define buffer_locked(bh) __buffer_state(bh,Lock) ++#define buffer_req(bh) __buffer_state(bh,Req) ++#define buffer_mapped(bh) __buffer_state(bh,Mapped) ++#define buffer_new(bh) __buffer_state(bh,New) ++#define buffer_async(bh) __buffer_state(bh,Async) ++#define buffer_launder(bh) __buffer_state(bh,Launder) ++ ++#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) ++ ++extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long offset); ++ ++#define touch_buffer(bh) mark_page_accessed(bh->b_page) ++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* ++ * Attribute flags. These should be or-ed together to figure out what ++ * has been changed! ++ */ ++#define ATTR_MODE 1 ++#define ATTR_UID 2 ++#define ATTR_GID 4 ++#define ATTR_SIZE 8 ++#define ATTR_ATIME 16 ++#define ATTR_MTIME 32 ++#define ATTR_CTIME 64 ++#define ATTR_ATIME_SET 128 ++#define ATTR_MTIME_SET 256 ++#define ATTR_FORCE 512 /* Not a change, but a change it */ ++#define ATTR_ATTR_FLAG 1024 ++ ++/* ++ * This is the Inode Attributes structure, used for notify_change(). It ++ * uses the above definitions as flags, to know which values have changed. ++ * Also, in this manner, a Filesystem can look at only the values it cares ++ * about. Basically, these are the attributes that the VFS layer can ++ * request to change from the FS layer. ++ * ++ * Derek Atkins 94-10-20 ++ */ ++struct iattr { ++ unsigned int ia_valid; ++ umode_t ia_mode; ++ uid_t ia_uid; ++ gid_t ia_gid; ++ loff_t ia_size; ++ time_t ia_atime; ++ time_t ia_mtime; ++ time_t ia_ctime; ++ unsigned int ia_attr_flags; ++}; ++ ++/* ++ * This is the inode attributes flag definitions ++ */ ++#define ATTR_FLAG_SYNCRONOUS 1 /* Syncronous write */ ++#define ATTR_FLAG_NOATIME 2 /* Don't update atime */ ++#define ATTR_FLAG_APPEND 4 /* Append-only file */ ++#define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */ ++#define ATTR_FLAG_NODIRATIME 16 /* Don't update atime for directory */ ++ ++/* ++ * Includes for diskquotas and mount structures. ++ */ ++#include ++#include ++ ++/* ++ * oh the beauties of C type declarations. ++ */ ++struct page; ++struct address_space; ++struct kiobuf; ++ ++struct address_space_operations { ++ int (*writepage)(struct page *); ++ int (*readpage)(struct file *, struct page *); ++ int (*sync_page)(struct page *); ++ /* ++ * ext3 requires that a successful prepare_write() call be followed ++ * by a commit_write() call - they must be balanced ++ */ ++ int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); ++ int (*commit_write)(struct file *, struct page *, unsigned, unsigned); ++ /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ ++ int (*bmap)(struct address_space *, long); ++ int (*flushpage) (struct page *, unsigned long); ++ int (*releasepage) (struct page *, int); ++#define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */ ++ int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int); ++#define KERNEL_HAS_DIRECT_FILEIO /* Unfortunate kludge due to lack of foresight */ ++ int (*direct_fileIO)(int, struct file *, struct kiobuf *, unsigned long, int); ++ void (*removepage)(struct page *); /* called when page gets removed from the inode */ ++}; ++ ++struct address_space { ++ struct list_head clean_pages; /* list of clean pages */ ++ struct list_head dirty_pages; /* list of dirty pages */ ++ struct list_head locked_pages; /* list of locked pages */ ++ unsigned long nrpages; /* number of total pages */ ++ struct address_space_operations *a_ops; /* methods */ ++ struct inode *host; /* owner: inode, block_device */ ++ struct vm_area_struct *i_mmap; /* list of private mappings */ ++ struct vm_area_struct *i_mmap_shared; /* list of shared mappings */ ++ spinlock_t i_shared_lock; /* and spinlock protecting it */ ++ int gfp_mask; /* how to allocate the pages */ ++}; ++ ++struct char_device { ++ struct list_head hash; ++ atomic_t count; ++ dev_t dev; ++ atomic_t openers; ++ struct semaphore sem; ++}; ++ ++struct block_device { ++ struct list_head bd_hash; ++ atomic_t bd_count; ++ struct inode * bd_inode; ++ dev_t bd_dev; /* not a kdev_t - it's a search key */ ++ int bd_openers; ++ const struct block_device_operations *bd_op; ++ struct semaphore bd_sem; /* open/close mutex */ ++ struct list_head bd_inodes; ++}; ++ ++struct inode { ++ struct list_head i_hash; ++ struct list_head i_list; ++ struct list_head i_dentry; ++ ++ struct list_head i_dirty_buffers; ++ struct list_head i_dirty_data_buffers; ++ ++ unsigned long i_ino; ++ atomic_t i_count; ++ kdev_t i_dev; ++ umode_t i_mode; ++ nlink_t i_nlink; ++ uid_t i_uid; ++ gid_t i_gid; ++ kdev_t i_rdev; ++ loff_t i_size; ++ time_t i_atime; ++ time_t i_mtime; ++ time_t i_ctime; ++ unsigned int i_blkbits; ++ unsigned long i_blksize; ++ unsigned long i_blocks; ++ unsigned long i_version; ++ unsigned short i_bytes; ++ struct semaphore i_sem; ++ struct rw_semaphore i_alloc_sem; ++ struct semaphore i_zombie; ++ struct inode_operations *i_op; ++ struct file_operations *i_fop; /* former ->i_op->default_file_ops */ ++ struct super_block *i_sb; ++ wait_queue_head_t i_wait; ++ struct file_lock *i_flock; ++ struct address_space *i_mapping; ++ struct address_space i_data; ++ struct dquot *i_dquot[MAXQUOTAS]; ++ /* These three should probably be a union */ ++ struct list_head i_devices; ++ struct pipe_inode_info *i_pipe; ++ struct block_device *i_bdev; ++ struct char_device *i_cdev; ++ ++ unsigned long i_dnotify_mask; /* Directory notify events */ ++ struct dnotify_struct *i_dnotify; /* for directory notifications */ ++ ++ unsigned long i_state; ++ ++ unsigned int i_flags; ++ unsigned char i_sock; ++ ++ atomic_t i_writecount; ++ unsigned int i_attr_flags; ++ __u32 i_generation; ++ union { ++ struct minix_inode_info minix_i; ++ struct ext2_inode_info ext2_i; ++ struct ext3_inode_info ext3_i; ++ struct hpfs_inode_info hpfs_i; ++ struct ntfs_inode_info ntfs_i; ++ struct msdos_inode_info msdos_i; ++ struct umsdos_inode_info umsdos_i; ++ struct iso_inode_info isofs_i; ++ struct nfs_inode_info nfs_i; ++ struct sysv_inode_info sysv_i; ++ struct affs_inode_info affs_i; ++ struct ufs_inode_info ufs_i; ++ struct efs_inode_info efs_i; ++ struct romfs_inode_info romfs_i; ++ struct shmem_inode_info shmem_i; ++ struct coda_inode_info coda_i; ++ struct smb_inode_info smbfs_i; ++ struct hfs_inode_info hfs_i; ++ struct adfs_inode_info adfs_i; ++ struct qnx4_inode_info qnx4_i; ++ struct reiserfs_inode_info reiserfs_i; ++ struct bfs_inode_info bfs_i; ++ struct udf_inode_info udf_i; ++ struct ncp_inode_info ncpfs_i; ++ struct proc_inode_info proc_i; ++ struct socket socket_i; ++ struct usbdev_inode_info usbdev_i; ++ struct jffs2_inode_info jffs2_i; ++ void *generic_ip; ++ } u; ++}; ++ ++static inline void inode_add_bytes(struct inode *inode, loff_t bytes) ++{ ++ inode->i_blocks += bytes >> 9; ++ bytes &= 511; ++ inode->i_bytes += bytes; ++ if (inode->i_bytes >= 512) { ++ inode->i_blocks++; ++ inode->i_bytes -= 512; ++ } ++} ++ ++static inline void inode_sub_bytes(struct inode *inode, loff_t bytes) ++{ ++ inode->i_blocks -= bytes >> 9; ++ bytes &= 511; ++ if (inode->i_bytes < bytes) { ++ inode->i_blocks--; ++ inode->i_bytes += 512; ++ } ++ inode->i_bytes -= bytes; ++} ++ ++static inline loff_t inode_get_bytes(struct inode *inode) ++{ ++ return (((loff_t)inode->i_blocks) << 9) + inode->i_bytes; ++} ++ ++static inline void inode_set_bytes(struct inode *inode, loff_t bytes) ++{ ++ inode->i_blocks = bytes >> 9; ++ inode->i_bytes = bytes & 511; ++} ++ ++struct fown_struct { ++ int pid; /* pid or -pgrp where SIGIO should be sent */ ++ uid_t uid, euid; /* uid/euid of process setting the owner */ ++ int signum; /* posix.1b rt signal to be delivered on IO */ ++}; ++ ++struct file { ++ struct list_head f_list; ++ struct dentry *f_dentry; ++ struct vfsmount *f_vfsmnt; ++ struct file_operations *f_op; ++ atomic_t f_count; ++ unsigned int f_flags; ++ mode_t f_mode; ++ loff_t f_pos; ++ unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin; ++ struct fown_struct f_owner; ++ unsigned int f_uid, f_gid; ++ int f_error; ++ ++ unsigned long f_version; ++ ++ /* needed for tty driver, and maybe others */ ++ void *private_data; ++ ++ /* preallocated helper kiobuf to speedup O_DIRECT */ ++ struct kiobuf *f_iobuf; ++ long f_iobuf_lock; ++}; ++extern spinlock_t files_lock; ++#define file_list_lock() spin_lock(&files_lock); ++#define file_list_unlock() spin_unlock(&files_lock); ++ ++#define get_file(x) atomic_inc(&(x)->f_count) ++#define file_count(x) atomic_read(&(x)->f_count) ++ ++extern int init_private_file(struct file *, struct dentry *, int); ++ ++#define MAX_NON_LFS ((1UL<<31) - 1) ++ ++/* Page cache limit. The filesystems should put that into their s_maxbytes ++ limits, otherwise bad things can happen in VM. */ ++#if BITS_PER_LONG==32 ++#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) ++#elif BITS_PER_LONG==64 ++#define MAX_LFS_FILESIZE 0x7fffffffffffffff ++#endif ++ ++#define FL_POSIX 1 ++#define FL_FLOCK 2 ++#define FL_BROKEN 4 /* broken flock() emulation */ ++#define FL_ACCESS 8 /* for processes suspended by mandatory locking */ ++#define FL_LOCKD 16 /* lock held by rpc.lockd */ ++#define FL_LEASE 32 /* lease held on this file */ ++ ++/* ++ * The POSIX file lock owner is determined by ++ * the "struct files_struct" in the thread group ++ * (or NULL for no owner - BSD locks). ++ * ++ * Lockd stuffs a "host" pointer into this. ++ */ ++typedef struct files_struct *fl_owner_t; ++ ++struct file_lock { ++ struct file_lock *fl_next; /* singly linked list for this inode */ ++ struct list_head fl_link; /* doubly linked list of all locks */ ++ struct list_head fl_block; /* circular list of blocked processes */ ++ fl_owner_t fl_owner; ++ unsigned int fl_pid; ++ wait_queue_head_t fl_wait; ++ struct file *fl_file; ++ unsigned char fl_flags; ++ unsigned char fl_type; ++ loff_t fl_start; ++ loff_t fl_end; ++ ++ void (*fl_notify)(struct file_lock *); /* unblock callback */ ++ void (*fl_insert)(struct file_lock *); /* lock insertion callback */ ++ void (*fl_remove)(struct file_lock *); /* lock removal callback */ ++ ++ struct fasync_struct * fl_fasync; /* for lease break notifications */ ++ unsigned long fl_break_time; /* for nonblocking lease breaks */ ++ ++ union { ++ struct nfs_lock_info nfs_fl; ++ } fl_u; ++}; ++ ++/* The following constant reflects the upper bound of the file/locking space */ ++#ifndef OFFSET_MAX ++#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1))) ++#define OFFSET_MAX INT_LIMIT(loff_t) ++#define OFFT_OFFSET_MAX INT_LIMIT(off_t) ++#endif ++ ++extern struct list_head file_lock_list; ++ ++#include ++ ++extern int fcntl_getlk(unsigned int, struct flock *); ++extern int fcntl_setlk(unsigned int, unsigned int, struct flock *); ++ ++extern int fcntl_getlk64(unsigned int, struct flock64 *); ++extern int fcntl_setlk64(unsigned int, unsigned int, struct flock64 *); ++ ++/* fs/locks.c */ ++extern void locks_init_lock(struct file_lock *); ++extern void locks_copy_lock(struct file_lock *, struct file_lock *); ++extern void locks_remove_posix(struct file *, fl_owner_t); ++extern void locks_remove_flock(struct file *); ++extern struct file_lock *posix_test_lock(struct file *, struct file_lock *); ++extern int posix_lock_file(struct file *, struct file_lock *, unsigned int); ++extern void posix_block_lock(struct file_lock *, struct file_lock *); ++extern void posix_unblock_lock(struct file_lock *); ++extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); ++extern int __get_lease(struct inode *inode, unsigned int flags); ++extern time_t lease_get_mtime(struct inode *); ++extern int lock_may_read(struct inode *, loff_t start, unsigned long count); ++extern int lock_may_write(struct inode *, loff_t start, unsigned long count); ++extern void steal_locks(fl_owner_t from); ++ ++struct fasync_struct { ++ int magic; ++ int fa_fd; ++ struct fasync_struct *fa_next; /* singly linked list */ ++ struct file *fa_file; ++}; ++ ++#define FASYNC_MAGIC 0x4601 ++ ++/* SMP safe fasync helpers: */ ++extern int fasync_helper(int, struct file *, int, struct fasync_struct **); ++/* can be called from interrupts */ ++extern void kill_fasync(struct fasync_struct **, int, int); ++/* only for net: no internal synchronization */ ++extern void __kill_fasync(struct fasync_struct *, int, int); ++ ++struct nameidata { ++ struct dentry *dentry; ++ struct vfsmount *mnt; ++ struct qstr last; ++ unsigned int flags; ++ int last_type; ++}; ++ ++/* ++ * Umount options ++ */ ++ ++#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ ++#define MNT_DETACH 0x00000002 /* Just detach from the tree */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++extern struct list_head super_blocks; ++extern spinlock_t sb_lock; ++ ++#define sb_entry(list) list_entry((list), struct super_block, s_list) ++#define S_BIAS (1<<30) ++struct super_block { ++ struct list_head s_list; /* Keep this first */ ++ kdev_t s_dev; ++ unsigned long s_blocksize; ++ unsigned char s_blocksize_bits; ++ unsigned char s_dirt; ++ unsigned long long s_maxbytes; /* Max file size */ ++ struct file_system_type *s_type; ++ struct super_operations *s_op; ++ struct dquot_operations *dq_op; ++ struct quotactl_ops *s_qcop; ++ unsigned long s_flags; ++ unsigned long s_magic; ++ struct dentry *s_root; ++ struct rw_semaphore s_umount; ++ struct semaphore s_lock; ++ int s_count; ++ atomic_t s_active; ++ ++ struct list_head s_dirty; /* dirty inodes */ ++ struct list_head s_locked_inodes;/* inodes being synced */ ++ struct list_head s_files; ++ ++ struct block_device *s_bdev; ++ struct list_head s_instances; ++ struct quota_info s_dquot; /* Diskquota specific options */ ++ ++ union { ++ struct minix_sb_info minix_sb; ++ struct ext2_sb_info ext2_sb; ++ struct ext3_sb_info ext3_sb; ++ struct hpfs_sb_info hpfs_sb; ++ struct ntfs_sb_info ntfs_sb; ++ struct msdos_sb_info msdos_sb; ++ struct isofs_sb_info isofs_sb; ++ struct nfs_sb_info nfs_sb; ++ struct sysv_sb_info sysv_sb; ++ struct affs_sb_info affs_sb; ++ struct ufs_sb_info ufs_sb; ++ struct efs_sb_info efs_sb; ++ struct shmem_sb_info shmem_sb; ++ struct romfs_sb_info romfs_sb; ++ struct smb_sb_info smbfs_sb; ++ struct hfs_sb_info hfs_sb; ++ struct adfs_sb_info adfs_sb; ++ struct qnx4_sb_info qnx4_sb; ++ struct reiserfs_sb_info reiserfs_sb; ++ struct bfs_sb_info bfs_sb; ++ struct udf_sb_info udf_sb; ++ struct ncp_sb_info ncpfs_sb; ++ struct usbdev_sb_info usbdevfs_sb; ++ struct jffs2_sb_info jffs2_sb; ++ struct cramfs_sb_info cramfs_sb; ++ void *generic_sbp; ++ } u; ++ /* ++ * The next field is for VFS *only*. No filesystems have any business ++ * even looking at it. You had been warned. ++ */ ++ struct semaphore s_vfs_rename_sem; /* Kludge */ ++ ++ /* The next field is used by knfsd when converting a (inode number based) ++ * file handle into a dentry. As it builds a path in the dcache tree from ++ * the bottom up, there may for a time be a subpath of dentrys which is not ++ * connected to the main tree. This semaphore ensure that there is only ever ++ * one such free path per filesystem. Note that unconnected files (or other ++ * non-directories) are allowed, but not unconnected diretories. ++ */ ++ struct semaphore s_nfsd_free_path_sem; ++}; ++ ++/* ++ * VFS helper functions.. ++ */ ++extern int vfs_create(struct inode *, struct dentry *, int); ++extern int vfs_mkdir(struct inode *, struct dentry *, int); ++extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); ++extern int vfs_symlink(struct inode *, struct dentry *, const char *); ++extern int vfs_link(struct dentry *, struct inode *, struct dentry *); ++extern int vfs_rmdir(struct inode *, struct dentry *); ++extern int vfs_unlink(struct inode *, struct dentry *); ++extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); ++ ++/* ++ * File types ++ */ ++#define DT_UNKNOWN 0 ++#define DT_FIFO 1 ++#define DT_CHR 2 ++#define DT_DIR 4 ++#define DT_BLK 6 ++#define DT_REG 8 ++#define DT_LNK 10 ++#define DT_SOCK 12 ++#define DT_WHT 14 ++ ++/* ++ * This is the "filldir" function type, used by readdir() to let ++ * the kernel specify what kind of dirent layout it wants to have. ++ * This allows the kernel to read directories into kernel space or ++ * to have different dirent layouts depending on the binary type. ++ */ ++typedef int (*filldir_t)(void *, const char *, int, loff_t, ino_t, unsigned); ++ ++struct block_device_operations { ++ int (*open) (struct inode *, struct file *); ++ int (*release) (struct inode *, struct file *); ++ int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); ++ int (*check_media_change) (kdev_t); ++ int (*revalidate) (kdev_t); ++ struct module *owner; ++}; ++ ++/* ++ * NOTE: ++ * read, write, poll, fsync, readv, writev can be called ++ * without the big kernel lock held in all filesystems. ++ */ ++struct file_operations { ++ struct module *owner; ++ loff_t (*llseek) (struct file *, loff_t, int); ++ ssize_t (*read) (struct file *, char *, size_t, loff_t *); ++ ssize_t (*write) (struct file *, const char *, size_t, loff_t *); ++ int (*readdir) (struct file *, void *, filldir_t); ++ unsigned int (*poll) (struct file *, struct poll_table_struct *); ++ int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); ++ int (*mmap) (struct file *, struct vm_area_struct *); ++ int (*open) (struct inode *, struct file *); ++ int (*flush) (struct file *); ++ int (*release) (struct inode *, struct file *); ++ int (*fsync) (struct file *, struct dentry *, int datasync); ++ int (*fasync) (int, struct file *, int); ++ int (*lock) (struct file *, int, struct file_lock *); ++ ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *); ++ ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *); ++ ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); ++ unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); ++}; ++ ++struct inode_operations { ++ int (*create) (struct inode *,struct dentry *,int); ++ struct dentry * (*lookup) (struct inode *,struct dentry *); ++ int (*link) (struct dentry *,struct inode *,struct dentry *); ++ int (*unlink) (struct inode *,struct dentry *); ++ int (*symlink) (struct inode *,struct dentry *,const char *); ++ int (*mkdir) (struct inode *,struct dentry *,int); ++ int (*rmdir) (struct inode *,struct dentry *); ++ int (*mknod) (struct inode *,struct dentry *,int,int); ++ int (*rename) (struct inode *, struct dentry *, ++ struct inode *, struct dentry *); ++ int (*readlink) (struct dentry *, char *,int); ++ int (*follow_link) (struct dentry *, struct nameidata *); ++ void (*truncate) (struct inode *); ++ int (*permission) (struct inode *, int); ++ int (*revalidate) (struct dentry *); ++ int (*setattr) (struct dentry *, struct iattr *); ++ int (*getattr) (struct dentry *, struct iattr *); ++ int (*setxattr) (struct dentry *, const char *, void *, size_t, int); ++ ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); ++ ssize_t (*listxattr) (struct dentry *, char *, size_t); ++ int (*removexattr) (struct dentry *, const char *); ++}; ++ ++struct seq_file; ++ ++/* ++ * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called ++ * without the big kernel lock held in all filesystems. ++ */ ++struct super_operations { ++ struct inode *(*alloc_inode)(struct super_block *sb); ++ void (*destroy_inode)(struct inode *); ++ ++ void (*read_inode) (struct inode *); ++ ++ /* reiserfs kludge. reiserfs needs 64 bits of information to ++ ** find an inode. We are using the read_inode2 call to get ++ ** that information. We don't like this, and are waiting on some ++ ** VFS changes for the real solution. ++ ** iget4 calls read_inode2, iff it is defined ++ */ ++ void (*read_inode2) (struct inode *, void *) ; ++ void (*dirty_inode) (struct inode *); ++ void (*write_inode) (struct inode *, int); ++ void (*put_inode) (struct inode *); ++ void (*delete_inode) (struct inode *); ++ void (*put_super) (struct super_block *); ++ void (*write_super) (struct super_block *); ++ int (*sync_fs) (struct super_block *); ++ void (*write_super_lockfs) (struct super_block *); ++ void (*unlockfs) (struct super_block *); ++ int (*statfs) (struct super_block *, struct statfs *); ++ int (*remount_fs) (struct super_block *, int *, char *); ++ void (*clear_inode) (struct inode *); ++ void (*umount_begin) (struct super_block *); ++ ++ /* Following are for knfsd to interact with "interesting" filesystems ++ * Currently just reiserfs, but possibly FAT and others later ++ * ++ * fh_to_dentry is given a filehandle fragement with length, and a type flag ++ * and must return a dentry for the referenced object or, if "parent" is ++ * set, a dentry for the parent of the object. ++ * If a dentry cannot be found, a "root" dentry should be created and ++ * flaged as DCACHE_NFSD_DISCONNECTED. nfsd_iget is an example implementation. ++ * ++ * dentry_to_fh is given a dentry and must generate the filesys specific ++ * part of the file handle. Available length is passed in *lenp and used ++ * length should be returned therein. ++ * If need_parent is set, then dentry_to_fh should encode sufficient information ++ * to find the (current) parent. ++ * dentry_to_fh should return a 1byte "type" which will be passed back in ++ * the fhtype arguement to fh_to_dentry. Type of 0 is reserved. ++ * If filesystem was exportable before the introduction of fh_to_dentry, ++ * types 1 and 2 should be used is that same way as the generic code. ++ * Type 255 means error. ++ * ++ * Lengths are in units of 4bytes, not bytes. ++ */ ++ struct dentry * (*fh_to_dentry)(struct super_block *sb, __u32 *fh, int len, int fhtype, int parent); ++ int (*dentry_to_fh)(struct dentry *, __u32 *fh, int *lenp, int need_parent); ++ int (*show_options)(struct seq_file *, struct vfsmount *); ++}; ++ ++/* Inode state bits.. */ ++#define I_DIRTY_SYNC 1 /* Not dirty enough for O_DATASYNC */ ++#define I_DIRTY_DATASYNC 2 /* Data-related inode changes pending */ ++#define I_DIRTY_PAGES 4 /* Data-related inode changes pending */ ++#define I_LOCK 8 ++#define I_FREEING 16 ++#define I_CLEAR 32 ++ ++#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) ++ ++extern void __mark_inode_dirty(struct inode *, int); ++static inline void mark_inode_dirty(struct inode *inode) ++{ ++ __mark_inode_dirty(inode, I_DIRTY); ++} ++ ++static inline void mark_inode_dirty_sync(struct inode *inode) ++{ ++ __mark_inode_dirty(inode, I_DIRTY_SYNC); ++} ++ ++static inline void mark_inode_dirty_pages(struct inode *inode) ++{ ++ __mark_inode_dirty(inode, I_DIRTY_PAGES); ++} ++ ++struct file_system_type { ++ const char *name; ++ int fs_flags; ++ struct super_block *(*read_super) (struct super_block *, void *, int); ++ struct module *owner; ++ struct file_system_type * next; ++ struct list_head fs_supers; ++}; ++ ++#define DECLARE_FSTYPE(var,type,read,flags) \ ++struct file_system_type var = { \ ++ name: type, \ ++ read_super: read, \ ++ fs_flags: flags, \ ++ owner: THIS_MODULE, \ ++} ++ ++#define DECLARE_FSTYPE_DEV(var,type,read) \ ++ DECLARE_FSTYPE(var,type,read,FS_REQUIRES_DEV) ++ ++/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ ++#define fops_get(fops) \ ++ (((fops) && (fops)->owner) \ ++ ? ( try_inc_mod_count((fops)->owner) ? (fops) : NULL ) \ ++ : (fops)) ++ ++#define fops_put(fops) \ ++do { \ ++ if ((fops) && (fops)->owner) \ ++ __MOD_DEC_USE_COUNT((fops)->owner); \ ++} while(0) ++ ++extern int register_filesystem(struct file_system_type *); ++extern int unregister_filesystem(struct file_system_type *); ++extern struct vfsmount *kern_mount(struct file_system_type *); ++extern int may_umount(struct vfsmount *); ++extern long do_mount(char *, char *, char *, unsigned long, void *); ++ ++#define kern_umount mntput ++ ++extern int vfs_statfs(struct super_block *, struct statfs *); ++ ++/* Return value for VFS lock functions - tells locks.c to lock conventionally ++ * REALLY kosha for root NFS and nfs_lock ++ */ ++#define LOCK_USE_CLNT 1 ++ ++#define FLOCK_VERIFY_READ 1 ++#define FLOCK_VERIFY_WRITE 2 ++ ++extern int locks_mandatory_locked(struct inode *); ++extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); ++ ++/* ++ * Candidates for mandatory locking have the setgid bit set ++ * but no group execute bit - an otherwise meaningless combination. ++ */ ++#define MANDATORY_LOCK(inode) \ ++ (IS_MANDLOCK(inode) && ((inode)->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) ++ ++static inline int locks_verify_locked(struct inode *inode) ++{ ++ if (MANDATORY_LOCK(inode)) ++ return locks_mandatory_locked(inode); ++ return 0; ++} ++ ++static inline int locks_verify_area(int read_write, struct inode *inode, ++ struct file *filp, loff_t offset, ++ size_t count) ++{ ++ if (inode->i_flock && MANDATORY_LOCK(inode)) ++ return locks_mandatory_area(read_write, inode, filp, offset, count); ++ return 0; ++} ++ ++static inline int locks_verify_truncate(struct inode *inode, ++ struct file *filp, ++ loff_t size) ++{ ++ if (inode->i_flock && MANDATORY_LOCK(inode)) ++ return locks_mandatory_area( ++ FLOCK_VERIFY_WRITE, inode, filp, ++ size < inode->i_size ? size : inode->i_size, ++ (size < inode->i_size ? inode->i_size - size ++ : size - inode->i_size) ++ ); ++ return 0; ++} ++ ++static inline int get_lease(struct inode *inode, unsigned int mode) ++{ ++ if (inode->i_flock) ++ return __get_lease(inode, mode); ++ return 0; ++} ++ ++/* fs/open.c */ ++ ++asmlinkage long sys_open(const char *, int, int); ++asmlinkage long sys_close(unsigned int); /* yes, it's really unsigned */ ++extern int do_truncate(struct dentry *, loff_t start); ++ ++extern struct file *filp_open(const char *, int, int); ++extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); ++extern int filp_close(struct file *, fl_owner_t id); ++extern char * getname(const char *); ++ ++/* fs/dcache.c */ ++extern void vfs_caches_init(unsigned long); ++ ++#define __getname() kmem_cache_alloc(names_cachep, SLAB_KERNEL) ++#define putname(name) kmem_cache_free(names_cachep, (void *)(name)) ++ ++enum {BDEV_FILE, BDEV_SWAP, BDEV_FS, BDEV_RAW}; ++extern int register_blkdev(unsigned int, const char *, struct block_device_operations *); ++extern int unregister_blkdev(unsigned int, const char *); ++extern struct block_device *bdget(dev_t); ++extern int bd_acquire(struct inode *inode); ++extern void bd_forget(struct inode *inode); ++extern void bdput(struct block_device *); ++extern struct char_device *cdget(dev_t); ++extern void cdput(struct char_device *); ++extern int blkdev_open(struct inode *, struct file *); ++extern int blkdev_close(struct inode *, struct file *); ++extern struct file_operations def_blk_fops; ++extern struct address_space_operations def_blk_aops; ++extern struct file_operations def_fifo_fops; ++extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); ++extern int blkdev_get(struct block_device *, mode_t, unsigned, int); ++extern int blkdev_put(struct block_device *, int); ++ ++/* fs/devices.c */ ++extern const struct block_device_operations *get_blkfops(unsigned int); ++extern int register_chrdev(unsigned int, const char *, struct file_operations *); ++extern int unregister_chrdev(unsigned int, const char *); ++extern int chrdev_open(struct inode *, struct file *); ++extern const char * bdevname(kdev_t); ++extern const char * cdevname(kdev_t); ++extern const char * kdevname(kdev_t); ++extern void init_special_inode(struct inode *, umode_t, int); ++ ++/* Invalid inode operations -- fs/bad_inode.c */ ++extern void make_bad_inode(struct inode *); ++extern int is_bad_inode(struct inode *); ++ ++extern struct file_operations read_fifo_fops; ++extern struct file_operations write_fifo_fops; ++extern struct file_operations rdwr_fifo_fops; ++extern struct file_operations read_pipe_fops; ++extern struct file_operations write_pipe_fops; ++extern struct file_operations rdwr_pipe_fops; ++ ++extern int fs_may_remount_ro(struct super_block *); ++ ++extern int FASTCALL(try_to_free_buffers(struct page *, unsigned int)); ++extern void refile_buffer(struct buffer_head * buf); ++extern void create_empty_buffers(struct page *, kdev_t, unsigned long); ++extern void end_buffer_io_sync(struct buffer_head *bh, int uptodate); ++ ++/* reiserfs_writepage needs this */ ++extern void set_buffer_async_io(struct buffer_head *bh) ; ++ ++#define BUF_CLEAN 0 ++#define BUF_LOCKED 1 /* Buffers scheduled for write */ ++#define BUF_DIRTY 2 /* Dirty buffers, not yet scheduled for write */ ++#define NR_LIST 3 ++ ++static inline void get_bh(struct buffer_head * bh) ++{ ++ atomic_inc(&(bh)->b_count); ++} ++ ++static inline void put_bh(struct buffer_head *bh) ++{ ++ smp_mb__before_atomic_dec(); ++ atomic_dec(&bh->b_count); ++} ++ ++/* ++ * This is called by bh->b_end_io() handlers when I/O has completed. ++ */ ++static inline void mark_buffer_uptodate(struct buffer_head * bh, int on) ++{ ++ if (on) ++ set_bit(BH_Uptodate, &bh->b_state); ++ else ++ clear_bit(BH_Uptodate, &bh->b_state); ++} ++ ++#define atomic_set_buffer_clean(bh) test_and_clear_bit(BH_Dirty, &(bh)->b_state) ++ ++static inline void __mark_buffer_clean(struct buffer_head *bh) ++{ ++ refile_buffer(bh); ++} ++ ++static inline void mark_buffer_clean(struct buffer_head * bh) ++{ ++ if (atomic_set_buffer_clean(bh)) ++ __mark_buffer_clean(bh); ++} ++ ++extern void FASTCALL(__mark_dirty(struct buffer_head *bh)); ++extern void FASTCALL(__mark_buffer_dirty(struct buffer_head *bh)); ++extern void FASTCALL(mark_buffer_dirty(struct buffer_head *bh)); ++ ++extern void FASTCALL(buffer_insert_list(struct buffer_head *, struct list_head *)); ++ ++static inline void buffer_insert_inode_queue(struct buffer_head *bh, struct inode *inode) ++{ ++ buffer_insert_list(bh, &inode->i_dirty_buffers); ++} ++ ++static inline void buffer_insert_inode_data_queue(struct buffer_head *bh, struct inode *inode) ++{ ++ buffer_insert_list(bh, &inode->i_dirty_data_buffers); ++} ++ ++static inline int atomic_set_buffer_dirty(struct buffer_head *bh) ++{ ++ return test_and_set_bit(BH_Dirty, &bh->b_state); ++} ++ ++static inline void mark_buffer_async(struct buffer_head * bh, int on) ++{ ++ if (on) ++ set_bit(BH_Async, &bh->b_state); ++ else ++ clear_bit(BH_Async, &bh->b_state); ++} ++ ++static inline void set_buffer_attached(struct buffer_head *bh) ++{ ++ set_bit(BH_Attached, &bh->b_state); ++} ++ ++static inline void clear_buffer_attached(struct buffer_head *bh) ++{ ++ clear_bit(BH_Attached, &bh->b_state); ++} ++ ++static inline int buffer_attached(struct buffer_head *bh) ++{ ++ return test_bit(BH_Attached, &bh->b_state); ++} ++ ++/* ++ * If an error happens during the make_request, this function ++ * has to be recalled. It marks the buffer as clean and not ++ * uptodate, and it notifys the upper layer about the end ++ * of the I/O. ++ */ ++static inline void buffer_IO_error(struct buffer_head * bh) ++{ ++ mark_buffer_clean(bh); ++ /* ++ * b_end_io has to clear the BH_Uptodate bitflag in the error case! ++ */ ++ bh->b_end_io(bh, 0); ++} ++ ++static inline void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) ++{ ++ mark_buffer_dirty(bh); ++ buffer_insert_inode_queue(bh, inode); ++} ++ ++extern void set_buffer_flushtime(struct buffer_head *); ++extern void balance_dirty(void); ++extern int check_disk_change(kdev_t); ++extern int invalidate_inodes(struct super_block *); ++extern int invalidate_device(kdev_t, int); ++extern void invalidate_inode_pages(struct inode *); ++extern void invalidate_inode_pages2(struct address_space *); ++extern void invalidate_inode_buffers(struct inode *); ++#define invalidate_buffers(dev) __invalidate_buffers((dev), 0) ++#define destroy_buffers(dev) __invalidate_buffers((dev), 1) ++extern void invalidate_bdev(struct block_device *, int); ++extern void __invalidate_buffers(kdev_t dev, int); ++extern void sync_inodes(kdev_t); ++extern void sync_unlocked_inodes(void); ++extern void write_inode_now(struct inode *, int); ++extern int sync_buffers(kdev_t, int); ++extern void sync_dev(kdev_t); ++extern int fsync_dev(kdev_t); ++extern int fsync_super(struct super_block *); ++extern int fsync_no_super(kdev_t); ++extern void sync_inodes_sb(struct super_block *); ++extern int fsync_buffers_list(struct list_head *); ++static inline int fsync_inode_buffers(struct inode *inode) ++{ ++ return fsync_buffers_list(&inode->i_dirty_buffers); ++} ++static inline int fsync_inode_data_buffers(struct inode *inode) ++{ ++ return fsync_buffers_list(&inode->i_dirty_data_buffers); ++} ++extern int inode_has_buffers(struct inode *); ++extern int do_fdatasync(struct file *); ++extern int filemap_fdatasync(struct address_space *); ++extern int filemap_fdatawait(struct address_space *); ++extern void sync_supers(kdev_t dev, int wait); ++extern int bmap(struct inode *, int); ++extern int notify_change(struct dentry *, struct iattr *); ++extern int permission(struct inode *, int); ++extern int vfs_permission(struct inode *, int); ++extern int get_write_access(struct inode *); ++extern int deny_write_access(struct file *); ++static inline void put_write_access(struct inode * inode) ++{ ++ atomic_dec(&inode->i_writecount); ++} ++static inline void allow_write_access(struct file *file) ++{ ++ if (file) ++ atomic_inc(&file->f_dentry->d_inode->i_writecount); ++} ++extern int do_pipe(int *); ++ ++extern int open_namei(const char *, int, int, struct nameidata *); ++ ++extern int kernel_read(struct file *, unsigned long, char *, unsigned long); ++extern struct file * open_exec(const char *); ++ ++/* fs/dcache.c -- generic fs support functions */ ++extern int is_subdir(struct dentry *, struct dentry *); ++extern ino_t find_inode_number(struct dentry *, struct qstr *); ++ ++/* ++ * Kernel pointers have redundant information, so we can use a ++ * scheme where we can return either an error code or a dentry ++ * pointer with the same return value. ++ * ++ * This should be a per-architecture thing, to allow different ++ * error and pointer decisions. ++ */ ++static inline void *ERR_PTR(long error) ++{ ++ return (void *) error; ++} ++ ++static inline long PTR_ERR(const void *ptr) ++{ ++ return (long) ptr; ++} ++ ++static inline long IS_ERR(const void *ptr) ++{ ++ return (unsigned long)ptr > (unsigned long)-1000L; ++} ++ ++/* ++ * The bitmask for a lookup event: ++ * - follow links at the end ++ * - require a directory ++ * - ending slashes ok even for nonexistent files ++ * - internal "there are more path compnents" flag ++ */ ++#define LOOKUP_FOLLOW (1) ++#define LOOKUP_DIRECTORY (2) ++#define LOOKUP_CONTINUE (4) ++#define LOOKUP_POSITIVE (8) ++#define LOOKUP_PARENT (16) ++#define LOOKUP_NOALT (32) ++/* ++ * Type of the last component on LOOKUP_PARENT ++ */ ++enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; ++ ++/* ++ * "descriptor" for what we're up to with a read for sendfile(). ++ * This allows us to use the same read code yet ++ * have multiple different users of the data that ++ * we read from a file. ++ * ++ * The simplest case just copies the data to user ++ * mode. ++ */ ++typedef struct { ++ size_t written; ++ size_t count; ++ char * buf; ++ int error; ++} read_descriptor_t; ++ ++typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); ++ ++/* needed for stackable file system support */ ++extern loff_t default_llseek(struct file *file, loff_t offset, int origin); ++ ++extern int FASTCALL(__user_walk(const char *, unsigned, struct nameidata *)); ++extern int FASTCALL(path_init(const char *, unsigned, struct nameidata *)); ++extern int FASTCALL(path_walk(const char *, struct nameidata *)); ++extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); ++extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); ++extern void path_release(struct nameidata *); ++extern int follow_down(struct vfsmount **, struct dentry **); ++extern int follow_up(struct vfsmount **, struct dentry **); ++extern struct dentry * lookup_one_len(const char *, struct dentry *, int); ++extern struct dentry * lookup_hash(struct qstr *, struct dentry *); ++#define user_path_walk(name,nd) __user_walk(name, LOOKUP_FOLLOW|LOOKUP_POSITIVE, nd) ++#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd) ++ ++extern void inode_init_once(struct inode *); ++extern void iput(struct inode *); ++extern void force_delete(struct inode *); ++extern struct inode * igrab(struct inode *); ++extern ino_t iunique(struct super_block *, ino_t); ++ ++typedef int (*find_inode_t)(struct inode *, unsigned long, void *); ++extern struct inode * iget4(struct super_block *, unsigned long, find_inode_t, void *); ++static inline struct inode *iget(struct super_block *sb, unsigned long ino) ++{ ++ return iget4(sb, ino, NULL, NULL); ++} ++ ++extern void clear_inode(struct inode *); ++extern struct inode *new_inode(struct super_block *sb); ++extern void remove_suid(struct inode *inode); ++ ++extern void insert_inode_hash(struct inode *); ++extern void remove_inode_hash(struct inode *); ++extern struct file * get_empty_filp(void); ++extern void file_move(struct file *f, struct list_head *list); ++extern struct buffer_head * get_hash_table(kdev_t, int, int); ++extern struct buffer_head * getblk(kdev_t, int, int); ++extern void ll_rw_block(int, int, struct buffer_head * bh[]); ++extern void submit_bh(int, struct buffer_head *); ++extern int is_read_only(kdev_t); ++extern void __brelse(struct buffer_head *); ++static inline void brelse(struct buffer_head *buf) ++{ ++ if (buf) ++ __brelse(buf); ++} ++extern void __bforget(struct buffer_head *); ++static inline void bforget(struct buffer_head *buf) ++{ ++ if (buf) ++ __bforget(buf); ++} ++extern int set_blocksize(kdev_t, int); ++extern int sb_set_blocksize(struct super_block *, int); ++extern int sb_min_blocksize(struct super_block *, int); ++extern struct buffer_head * bread(kdev_t, int, int); ++static inline struct buffer_head * sb_bread(struct super_block *sb, int block) ++{ ++ return bread(sb->s_dev, block, sb->s_blocksize); ++} ++static inline struct buffer_head * sb_getblk(struct super_block *sb, int block) ++{ ++ return getblk(sb->s_dev, block, sb->s_blocksize); ++} ++static inline struct buffer_head * sb_get_hash_table(struct super_block *sb, int block) ++{ ++ return get_hash_table(sb->s_dev, block, sb->s_blocksize); ++} ++extern void wakeup_bdflush(void); ++extern void put_unused_buffer_head(struct buffer_head * bh); ++extern struct buffer_head * get_unused_buffer_head(int async); ++ ++extern int brw_page(int, struct page *, kdev_t, int [], int); ++ ++typedef int (get_block_t)(struct inode*,long,struct buffer_head*,int); ++ ++/* Generic buffer handling for block filesystems.. */ ++extern int try_to_release_page(struct page * page, int gfp_mask); ++extern int discard_bh_page(struct page *, unsigned long, int); ++#define block_flushpage(page, offset) discard_bh_page(page, offset, 1) ++#define block_invalidate_page(page) discard_bh_page(page, 0, 0) ++extern int block_symlink(struct inode *, const char *, int); ++extern int block_write_full_page(struct page*, get_block_t*); ++extern int block_read_full_page(struct page*, get_block_t*); ++extern int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); ++extern int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, ++ unsigned long *); ++extern int generic_cont_expand(struct inode *inode, loff_t size) ; ++extern int block_commit_write(struct page *page, unsigned from, unsigned to); ++extern int block_sync_page(struct page *); ++ ++int generic_block_bmap(struct address_space *, long, get_block_t *); ++int generic_commit_write(struct file *, struct page *, unsigned, unsigned); ++int block_truncate_page(struct address_space *, loff_t, get_block_t *); ++extern int generic_direct_IO(int, struct inode *, struct kiobuf *, unsigned long, int, get_block_t *); ++extern int waitfor_one_page(struct page *); ++extern int writeout_one_page(struct page *); ++ ++extern int generic_file_mmap(struct file *, struct vm_area_struct *); ++extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); ++extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *); ++extern int precheck_file_write(struct file *, struct inode *, size_t *, loff_t *); ++extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *); ++extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t); ++extern loff_t no_llseek(struct file *file, loff_t offset, int origin); ++extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); ++extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); ++extern int generic_file_open(struct inode * inode, struct file * filp); ++ ++extern struct file_operations generic_ro_fops; ++ ++extern int vfs_readlink(struct dentry *, char *, int, const char *); ++extern int vfs_follow_link(struct nameidata *, const char *); ++extern int page_readlink(struct dentry *, char *, int); ++extern int page_follow_link(struct dentry *, struct nameidata *); ++extern struct inode_operations page_symlink_inode_operations; ++ ++extern int vfs_readdir(struct file *, filldir_t, void *); ++extern int dcache_dir_open(struct inode *, struct file *); ++extern int dcache_dir_close(struct inode *, struct file *); ++extern loff_t dcache_dir_lseek(struct file *, loff_t, int); ++extern int dcache_dir_fsync(struct file *, struct dentry *, int); ++extern int dcache_readdir(struct file *, void *, filldir_t); ++extern struct file_operations dcache_dir_ops; ++ ++extern struct file_system_type *get_fs_type(const char *name); ++extern struct super_block *get_super(kdev_t); ++extern void drop_super(struct super_block *sb); ++static inline int is_mounted(kdev_t dev) ++{ ++ struct super_block *sb = get_super(dev); ++ if (sb) { ++ drop_super(sb); ++ return 1; ++ } ++ return 0; ++} ++unsigned long generate_cluster(kdev_t, int b[], int); ++unsigned long generate_cluster_swab32(kdev_t, int b[], int); ++extern kdev_t ROOT_DEV; ++extern char root_device_name[]; ++ ++ ++extern void show_buffers(void); ++ ++#ifdef CONFIG_BLK_DEV_INITRD ++extern unsigned int real_root_dev; ++#endif ++ ++extern ssize_t char_read(struct file *, char *, size_t, loff_t *); ++extern ssize_t block_read(struct file *, char *, size_t, loff_t *); ++extern int read_ahead[]; ++ ++extern ssize_t char_write(struct file *, const char *, size_t, loff_t *); ++extern ssize_t block_write(struct file *, const char *, size_t, loff_t *); ++ ++extern int file_fsync(struct file *, struct dentry *, int); ++extern int generic_buffer_fdatasync(struct inode *inode, unsigned long start_idx, unsigned long end_idx); ++extern int generic_osync_inode(struct inode *, int); ++#define OSYNC_METADATA (1<<0) ++#define OSYNC_DATA (1<<1) ++#define OSYNC_INODE (1<<2) ++ ++extern int inode_change_ok(struct inode *, struct iattr *); ++extern int inode_setattr(struct inode *, struct iattr *); ++ ++/* kernel/fork.c */ ++extern int unshare_files(void); ++ ++/* ++ * Common dentry functions for inclusion in the VFS ++ * or in other stackable file systems. Some of these ++ * functions were in linux/fs/ C (VFS) files. ++ * ++ */ ++ ++/* ++ * Locking the parent is needed to: ++ * - serialize directory operations ++ * - make sure the parent doesn't change from ++ * under us in the middle of an operation. ++ * ++ * NOTE! Right now we'd rather use a "struct inode" ++ * for this, but as I expect things to move toward ++ * using dentries instead for most things it is ++ * probably better to start with the conceptually ++ * better interface of relying on a path of dentries. ++ */ ++static inline struct dentry *lock_parent(struct dentry *dentry) ++{ ++ struct dentry *dir = dget(dentry->d_parent); ++ ++ down(&dir->d_inode->i_sem); ++ return dir; ++} ++ ++static inline struct dentry *get_parent(struct dentry *dentry) ++{ ++ return dget(dentry->d_parent); ++} ++ ++static inline void unlock_dir(struct dentry *dir) ++{ ++ up(&dir->d_inode->i_sem); ++ dput(dir); ++} ++ ++/* ++ * Whee.. Deadlock country. Happily there are only two VFS ++ * operations that does this.. ++ */ ++static inline void double_down(struct semaphore *s1, struct semaphore *s2) ++{ ++ if (s1 != s2) { ++ if ((unsigned long) s1 < (unsigned long) s2) { ++ struct semaphore *tmp = s2; ++ s2 = s1; s1 = tmp; ++ } ++ down(s1); ++ } ++ down(s2); ++} ++ ++/* ++ * Ewwwwwwww... _triple_ lock. We are guaranteed that the 3rd argument is ++ * not equal to 1st and not equal to 2nd - the first case (target is parent of ++ * source) would be already caught, the second is plain impossible (target is ++ * its own parent and that case would be caught even earlier). Very messy. ++ * I _think_ that it works, but no warranties - please, look it through. ++ * Pox on bloody lusers who mandated overwriting rename() for directories... ++ */ ++ ++static inline void triple_down(struct semaphore *s1, ++ struct semaphore *s2, ++ struct semaphore *s3) ++{ ++ if (s1 != s2) { ++ if ((unsigned long) s1 < (unsigned long) s2) { ++ if ((unsigned long) s1 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s1; s1 = tmp; ++ } ++ if ((unsigned long) s1 < (unsigned long) s2) { ++ struct semaphore *tmp = s2; ++ s2 = s1; s1 = tmp; ++ } ++ } else { ++ if ((unsigned long) s1 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s1; s1 = tmp; ++ } ++ if ((unsigned long) s2 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s2; s2 = tmp; ++ } ++ } ++ down(s1); ++ } else if ((unsigned long) s2 < (unsigned long) s3) { ++ struct semaphore *tmp = s3; ++ s3 = s2; s2 = tmp; ++ } ++ down(s2); ++ down(s3); ++} ++ ++static inline void double_up(struct semaphore *s1, struct semaphore *s2) ++{ ++ up(s1); ++ if (s1 != s2) ++ up(s2); ++} ++ ++static inline void triple_up(struct semaphore *s1, ++ struct semaphore *s2, ++ struct semaphore *s3) ++{ ++ up(s1); ++ if (s1 != s2) ++ up(s2); ++ up(s3); ++} ++ ++static inline void double_lock(struct dentry *d1, struct dentry *d2) ++{ ++ double_down(&d1->d_inode->i_sem, &d2->d_inode->i_sem); ++} ++ ++static inline void double_unlock(struct dentry *d1, struct dentry *d2) ++{ ++ double_up(&d1->d_inode->i_sem,&d2->d_inode->i_sem); ++ dput(d1); ++ dput(d2); ++} ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _LINUX_FS_H */ +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/genhd.h lilo-22.5.9/kernel-headers/linux/genhd.h +--- lilo-22.5.9-orig/kernel-headers/linux/genhd.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/genhd.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,318 @@ ++#ifndef _LINUX_GENHD_H ++#define _LINUX_GENHD_H ++ ++/* ++ * genhd.h Copyright (C) 1992 Drew Eckhardt ++ * Generic hard disk header file by ++ * Drew Eckhardt ++ * ++ * ++ */ ++ ++#include ++#include ++#include ++ ++enum { ++/* These three have identical behaviour; use the second one if DOS fdisk gets ++ confused about extended/logical partitions starting past cylinder 1023. */ ++ DOS_EXTENDED_PARTITION = 5, ++ LINUX_EXTENDED_PARTITION = 0x85, ++ WIN98_EXTENDED_PARTITION = 0x0f, ++ ++ LINUX_SWAP_PARTITION = 0x82, ++ LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ ++ ++ SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, ++ ++ DM6_PARTITION = 0x54, /* has DDO: use xlated geom & offset */ ++ EZD_PARTITION = 0x55, /* EZ-DRIVE */ ++ DM6_AUX1PARTITION = 0x51, /* no DDO: use xlated geom */ ++ DM6_AUX3PARTITION = 0x53, /* no DDO: use xlated geom */ ++ ++ FREEBSD_PARTITION = 0xa5, /* FreeBSD Partition ID */ ++ OPENBSD_PARTITION = 0xa6, /* OpenBSD Partition ID */ ++ NETBSD_PARTITION = 0xa9, /* NetBSD Partition ID */ ++ BSDI_PARTITION = 0xb7, /* BSDI Partition ID */ ++/* Ours is not to wonder why.. */ ++ BSD_PARTITION = FREEBSD_PARTITION, ++ MINIX_PARTITION = 0x81, /* Minix Partition ID */ ++ PLAN9_PARTITION = 0x39, /* Plan 9 Partition ID */ ++ UNIXWARE_PARTITION = 0x63, /* Partition ID, same as */ ++ /* GNU_HURD and SCO Unix */ ++}; ++ ++struct partition { ++ unsigned char boot_ind; /* 0x80 - active */ ++ unsigned char head; /* starting head */ ++ unsigned char sector; /* starting sector */ ++ unsigned char cyl; /* starting cylinder */ ++ unsigned char sys_ind; /* What partition type */ ++ unsigned char end_head; /* end head */ ++ unsigned char end_sector; /* end sector */ ++ unsigned char end_cyl; /* end cylinder */ ++ unsigned int start_sect; /* starting sector counting from 0 */ ++ unsigned int nr_sects; /* nr of sectors in partition */ ++} __attribute__((packed)); ++ ++#ifdef __KERNEL__ ++# include ++ ++struct hd_struct { ++ unsigned long start_sect; ++ unsigned long nr_sects; ++ devfs_handle_t de; /* primary (master) devfs entry */ ++#ifdef CONFIG_DEVFS_FS ++ int number; ++#endif /* CONFIG_DEVFS_FS */ ++#ifdef CONFIG_BLK_STATS ++ /* Performance stats: */ ++ unsigned int ios_in_flight; ++ unsigned int io_ticks; ++ unsigned int last_idle_time; ++ unsigned int last_queue_change; ++ unsigned int aveq; ++ ++ unsigned int rd_ios; ++ unsigned int rd_merges; ++ unsigned int rd_ticks; ++ unsigned int rd_sectors; ++ unsigned int wr_ios; ++ unsigned int wr_merges; ++ unsigned int wr_ticks; ++ unsigned int wr_sectors; ++#endif /* CONFIG_BLK_STATS */ ++}; ++ ++#define GENHD_FL_REMOVABLE 1 ++ ++struct gendisk { ++ int major; /* major number of driver */ ++ const char *major_name; /* name of major driver */ ++ int minor_shift; /* number of times minor is shifted to ++ get real minor */ ++ int max_p; /* maximum partitions per device */ ++ ++ struct hd_struct *part; /* [indexed by minor] */ ++ int *sizes; /* [idem], device size in blocks */ ++ int nr_real; /* number of real devices */ ++ ++ void *real_devices; /* internal use */ ++ struct gendisk *next; ++ struct block_device_operations *fops; ++ ++ devfs_handle_t *de_arr; /* one per physical disc */ ++ char *flags; /* one per physical disc */ ++}; ++ ++/* drivers/block/genhd.c */ ++extern struct gendisk *gendisk_head; ++ ++extern void add_gendisk(struct gendisk *gp); ++extern void del_gendisk(struct gendisk *gp); ++extern struct gendisk *get_gendisk(kdev_t dev); ++extern int walk_gendisk(int (*walk)(struct gendisk *, void *), void *); ++ ++#endif /* __KERNEL__ */ ++ ++#ifdef CONFIG_SOLARIS_X86_PARTITION ++ ++#define SOLARIS_X86_NUMSLICE 8 ++#define SOLARIS_X86_VTOC_SANE (0x600DDEEEUL) ++ ++struct solaris_x86_slice { ++ ushort s_tag; /* ID tag of partition */ ++ ushort s_flag; /* permission flags */ ++ unsigned int s_start; /* start sector no of partition */ ++ unsigned int s_size; /* # of blocks in partition */ ++}; ++ ++struct solaris_x86_vtoc { ++ unsigned int v_bootinfo[3]; /* info needed by mboot (unsupported) */ ++ unsigned int v_sanity; /* to verify vtoc sanity */ ++ unsigned int v_version; /* layout version */ ++ char v_volume[8]; /* volume name */ ++ ushort v_sectorsz; /* sector size in bytes */ ++ ushort v_nparts; /* number of partitions */ ++ unsigned int v_reserved[10]; /* free space */ ++ struct solaris_x86_slice ++ v_slice[SOLARIS_X86_NUMSLICE]; /* slice headers */ ++ unsigned int timestamp[SOLARIS_X86_NUMSLICE]; /* timestamp (unsupported) */ ++ char v_asciilabel[128]; /* for compatibility */ ++}; ++ ++#endif /* CONFIG_SOLARIS_X86_PARTITION */ ++ ++#ifdef CONFIG_BSD_DISKLABEL ++/* ++ * BSD disklabel support by Yossi Gottlieb ++ * updated by Marc Espie ++ */ ++ ++/* check against BSD src/sys/sys/disklabel.h for consistency */ ++ ++#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */ ++#define BSD_MAXPARTITIONS 8 ++#define OPENBSD_MAXPARTITIONS 16 ++#define BSD_FS_UNUSED 0 /* disklabel unused partition entry ID */ ++struct bsd_disklabel { ++ __u32 d_magic; /* the magic number */ ++ __s16 d_type; /* drive type */ ++ __s16 d_subtype; /* controller/d_type specific */ ++ char d_typename[16]; /* type name, e.g. "eagle" */ ++ char d_packname[16]; /* pack identifier */ ++ __u32 d_secsize; /* # of bytes per sector */ ++ __u32 d_nsectors; /* # of data sectors per track */ ++ __u32 d_ntracks; /* # of tracks per cylinder */ ++ __u32 d_ncylinders; /* # of data cylinders per unit */ ++ __u32 d_secpercyl; /* # of data sectors per cylinder */ ++ __u32 d_secperunit; /* # of data sectors per unit */ ++ __u16 d_sparespertrack; /* # of spare sectors per track */ ++ __u16 d_sparespercyl; /* # of spare sectors per cylinder */ ++ __u32 d_acylinders; /* # of alt. cylinders per unit */ ++ __u16 d_rpm; /* rotational speed */ ++ __u16 d_interleave; /* hardware sector interleave */ ++ __u16 d_trackskew; /* sector 0 skew, per track */ ++ __u16 d_cylskew; /* sector 0 skew, per cylinder */ ++ __u32 d_headswitch; /* head switch time, usec */ ++ __u32 d_trkseek; /* track-to-track seek, usec */ ++ __u32 d_flags; /* generic flags */ ++#define NDDATA 5 ++ __u32 d_drivedata[NDDATA]; /* drive-type specific information */ ++#define NSPARE 5 ++ __u32 d_spare[NSPARE]; /* reserved for future use */ ++ __u32 d_magic2; /* the magic number (again) */ ++ __u16 d_checksum; /* xor of data incl. partitions */ ++ ++ /* filesystem and partition information: */ ++ __u16 d_npartitions; /* number of partitions in following */ ++ __u32 d_bbsize; /* size of boot area at sn0, bytes */ ++ __u32 d_sbsize; /* max size of fs superblock, bytes */ ++ struct bsd_partition { /* the partition table */ ++ __u32 p_size; /* number of sectors in partition */ ++ __u32 p_offset; /* starting sector */ ++ __u32 p_fsize; /* filesystem basic fragment size */ ++ __u8 p_fstype; /* filesystem type, see below */ ++ __u8 p_frag; /* filesystem fragments per block */ ++ __u16 p_cpg; /* filesystem cylinders per group */ ++ } d_partitions[BSD_MAXPARTITIONS]; /* actually may be more */ ++}; ++ ++#endif /* CONFIG_BSD_DISKLABEL */ ++ ++#ifdef CONFIG_UNIXWARE_DISKLABEL ++/* ++ * Unixware slices support by Andrzej Krzysztofowicz ++ * and Krzysztof G. Baranowski ++ */ ++ ++#define UNIXWARE_DISKMAGIC (0xCA5E600DUL) /* The disk magic number */ ++#define UNIXWARE_DISKMAGIC2 (0x600DDEEEUL) /* The slice table magic nr */ ++#define UNIXWARE_NUMSLICE 16 ++#define UNIXWARE_FS_UNUSED 0 /* Unused slice entry ID */ ++ ++struct unixware_slice { ++ __u16 s_label; /* label */ ++ __u16 s_flags; /* permission flags */ ++ __u32 start_sect; /* starting sector */ ++ __u32 nr_sects; /* number of sectors in slice */ ++}; ++ ++struct unixware_disklabel { ++ __u32 d_type; /* drive type */ ++ __u32 d_magic; /* the magic number */ ++ __u32 d_version; /* version number */ ++ char d_serial[12]; /* serial number of the device */ ++ __u32 d_ncylinders; /* # of data cylinders per device */ ++ __u32 d_ntracks; /* # of tracks per cylinder */ ++ __u32 d_nsectors; /* # of data sectors per track */ ++ __u32 d_secsize; /* # of bytes per sector */ ++ __u32 d_part_start; /* # of first sector of this partition */ ++ __u32 d_unknown1[12]; /* ? */ ++ __u32 d_alt_tbl; /* byte offset of alternate table */ ++ __u32 d_alt_len; /* byte length of alternate table */ ++ __u32 d_phys_cyl; /* # of physical cylinders per device */ ++ __u32 d_phys_trk; /* # of physical tracks per cylinder */ ++ __u32 d_phys_sec; /* # of physical sectors per track */ ++ __u32 d_phys_bytes; /* # of physical bytes per sector */ ++ __u32 d_unknown2; /* ? */ ++ __u32 d_unknown3; /* ? */ ++ __u32 d_pad[8]; /* pad */ ++ ++ struct unixware_vtoc { ++ __u32 v_magic; /* the magic number */ ++ __u32 v_version; /* version number */ ++ char v_name[8]; /* volume name */ ++ __u16 v_nslices; /* # of slices */ ++ __u16 v_unknown1; /* ? */ ++ __u32 v_reserved[10]; /* reserved */ ++ struct unixware_slice ++ v_slice[UNIXWARE_NUMSLICE]; /* slice headers */ ++ } vtoc; ++ ++}; /* 408 */ ++ ++#endif /* CONFIG_UNIXWARE_DISKLABEL */ ++ ++#ifdef CONFIG_MINIX_SUBPARTITION ++# define MINIX_NR_SUBPARTITIONS 4 ++#endif /* CONFIG_MINIX_SUBPARTITION */ ++ ++#ifdef __KERNEL__ ++ ++char *disk_name (struct gendisk *hd, int minor, char *buf); ++ ++/* ++ * Account for the completion of an IO request (used by drivers which ++ * bypass the normal end_request processing) ++ */ ++struct request; ++ ++#ifdef CONFIG_BLK_STATS ++extern void disk_round_stats(struct hd_struct *hd); ++extern void req_new_io(struct request *req, int merge, int sectors); ++extern void req_merged_io(struct request *req); ++extern void req_finished_io(struct request *req); ++#else ++static inline void req_new_io(struct request *req, int merge, int sectors) { } ++static inline void req_merged_io(struct request *req) { } ++static inline void req_finished_io(struct request *req) { } ++#endif /* CONFIG_BLK_STATS */ ++ ++extern void devfs_register_partitions (struct gendisk *dev, int minor, ++ int unregister); ++ ++ ++ ++/* ++ * FIXME: this should use genhd->minor_shift, but that is slow to look up. ++ */ ++static inline unsigned int disk_index (kdev_t dev) ++{ ++ int major = MAJOR(dev); ++ int minor = MINOR(dev); ++ unsigned int index; ++ ++ switch (major) { ++ case DAC960_MAJOR+0: ++ index = (minor & 0x00f8) >> 3; ++ break; ++ case SCSI_DISK0_MAJOR: ++ index = (minor & 0x00f0) >> 4; ++ break; ++ case IDE0_MAJOR: /* same as HD_MAJOR */ ++ case XT_DISK_MAJOR: ++ index = (minor & 0x0040) >> 6; ++ break; ++ case IDE1_MAJOR: ++ index = ((minor & 0x0040) >> 6) + 2; ++ break; ++ default: ++ return 0; ++ } ++ return index; ++} ++ ++#endif ++ ++#endif +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/hdreg.h lilo-22.5.9/kernel-headers/linux/hdreg.h +--- lilo-22.5.9-orig/kernel-headers/linux/hdreg.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/hdreg.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,746 @@ ++#ifndef _LINUX_HDREG_H ++#define _LINUX_HDREG_H ++ ++/* ++ * This file contains some defines for the AT-hd-controller. ++ * Various sources. ++ */ ++ ++#define HD_IRQ 14 /* the standard disk interrupt */ ++ ++/* ide.c has its own port definitions in "ide.h" */ ++ ++/* Hd controller regs. Ref: IBM AT Bios-listing */ ++#define HD_DATA 0x1f0 /* _CTL when writing */ ++#define HD_ERROR 0x1f1 /* see err-bits */ ++#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */ ++#define HD_SECTOR 0x1f3 /* starting sector */ ++#define HD_LCYL 0x1f4 /* starting cylinder */ ++#define HD_HCYL 0x1f5 /* high byte of starting cyl */ ++#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */ ++#define HD_STATUS 0x1f7 /* see status-bits */ ++#define HD_FEATURE HD_ERROR /* same io address, read=error, write=feature */ ++#define HD_PRECOMP HD_FEATURE /* obsolete use of this port - predates IDE */ ++#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */ ++ ++#define HD_CMD 0x3f6 /* used for resets */ ++#define HD_ALTSTATUS 0x3f6 /* same as HD_STATUS but doesn't clear irq */ ++ ++/* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */ ++ ++/* Bits of HD_STATUS */ ++#define ERR_STAT 0x01 ++#define INDEX_STAT 0x02 ++#define ECC_STAT 0x04 /* Corrected error */ ++#define DRQ_STAT 0x08 ++#define SEEK_STAT 0x10 ++#define SRV_STAT 0x10 ++#define WRERR_STAT 0x20 ++#define READY_STAT 0x40 ++#define BUSY_STAT 0x80 ++ ++/* Bits for HD_ERROR */ ++#define MARK_ERR 0x01 /* Bad address mark */ ++#define TRK0_ERR 0x02 /* couldn't find track 0 */ ++#define ABRT_ERR 0x04 /* Command aborted */ ++#define MCR_ERR 0x08 /* media change request */ ++#define ID_ERR 0x10 /* ID field not found */ ++#define MC_ERR 0x20 /* media changed */ ++#define ECC_ERR 0x40 /* Uncorrectable ECC error */ ++#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */ ++#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */ ++ ++/* Bits of HD_NSECTOR */ ++#define CD 0x01 ++#define IO 0x02 ++#define REL 0x04 ++#define TAG_MASK 0xf8 ++ ++ ++/* ++ * Command Header sizes for IOCTL commands ++ * HDIO_DRIVE_CMD, HDIO_DRIVE_TASK, and HDIO_DRIVE_TASKFILE ++ */ ++ ++#if 0 ++#include ++typedef ide_ioreg_t task_ioreg_t; ++#else ++typedef unsigned char task_ioreg_t; ++#endif ++ ++typedef unsigned long sata_ioreg_t; ++ ++#define HDIO_DRIVE_CMD_HDR_SIZE 4*sizeof(task_ioreg_t) ++#define HDIO_DRIVE_TASK_HDR_SIZE 8*sizeof(task_ioreg_t) ++#define HDIO_DRIVE_HOB_HDR_SIZE 8*sizeof(task_ioreg_t) ++ ++#define IDE_DRIVE_TASK_INVALID -1 ++#define IDE_DRIVE_TASK_NO_DATA 0 ++#define IDE_DRIVE_TASK_SET_XFER 1 ++ ++#define IDE_DRIVE_TASK_IN 2 ++ ++#define IDE_DRIVE_TASK_OUT 3 ++#define IDE_DRIVE_TASK_RAW_WRITE 4 ++ ++struct hd_drive_cmd_hdr { ++ task_ioreg_t command; ++ task_ioreg_t sector_number; ++ task_ioreg_t feature; ++ task_ioreg_t sector_count; ++}; ++ ++typedef struct hd_drive_task_hdr { ++ task_ioreg_t data; ++ task_ioreg_t feature; ++ task_ioreg_t sector_count; ++ task_ioreg_t sector_number; ++ task_ioreg_t low_cylinder; ++ task_ioreg_t high_cylinder; ++ task_ioreg_t device_head; ++ task_ioreg_t command; ++} task_struct_t; ++ ++typedef struct hd_drive_hob_hdr { ++ task_ioreg_t data; ++ task_ioreg_t feature; ++ task_ioreg_t sector_count; ++ task_ioreg_t sector_number; ++ task_ioreg_t low_cylinder; ++ task_ioreg_t high_cylinder; ++ task_ioreg_t device_head; ++ task_ioreg_t control; ++} hob_struct_t; ++ ++typedef union ide_reg_valid_s { ++ unsigned all : 16; ++ struct { ++ unsigned data : 1; ++ unsigned error_feature : 1; ++ unsigned sector : 1; ++ unsigned nsector : 1; ++ unsigned lcyl : 1; ++ unsigned hcyl : 1; ++ unsigned select : 1; ++ unsigned status_command : 1; ++ ++ unsigned data_hob : 1; ++ unsigned error_feature_hob : 1; ++ unsigned sector_hob : 1; ++ unsigned nsector_hob : 1; ++ unsigned lcyl_hob : 1; ++ unsigned hcyl_hob : 1; ++ unsigned select_hob : 1; ++ unsigned control_hob : 1; ++ } b; ++} ide_reg_valid_t; ++ ++/* ++ * Define standard taskfile in/out register ++ */ ++#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE ++#define IDE_TASKFILE_STD_IN_FLAGS 0xFE ++#define IDE_HOB_STD_OUT_FLAGS 0x3C ++#define IDE_HOB_STD_IN_FLAGS 0x3C ++ ++typedef struct ide_task_request_s { ++ task_ioreg_t io_ports[8]; ++ task_ioreg_t hob_ports[8]; ++ ide_reg_valid_t out_flags; ++ ide_reg_valid_t in_flags; ++ int data_phase; ++ int req_cmd; ++ unsigned long out_size; ++ unsigned long in_size; ++} ide_task_request_t; ++ ++typedef struct ide_ioctl_request_s { ++ ide_task_request_t *task_request; ++ unsigned char *out_buffer; ++ unsigned char *in_buffer; ++} ide_ioctl_request_t; ++ ++#define TASKFILE_INVALID 0x7fff ++#define TASKFILE_48 0x8000 ++ ++#define TASKFILE_NO_DATA 0x0000 ++ ++#define TASKFILE_IN 0x0001 ++#define TASKFILE_MULTI_IN 0x0002 ++ ++#define TASKFILE_OUT 0x0004 ++#define TASKFILE_MULTI_OUT 0x0008 ++#define TASKFILE_IN_OUT 0x0010 ++ ++#define TASKFILE_IN_DMA 0x0020 ++#define TASKFILE_OUT_DMA 0x0040 ++#define TASKFILE_IN_DMAQ 0x0080 ++#define TASKFILE_OUT_DMAQ 0x0100 ++ ++#define TASKFILE_P_IN 0x0200 ++#define TASKFILE_P_OUT 0x0400 ++#define TASKFILE_P_IN_DMA 0x0800 ++#define TASKFILE_P_OUT_DMA 0x1000 ++#define TASKFILE_P_IN_DMAQ 0x2000 ++#define TASKFILE_P_OUT_DMAQ 0x4000 ++ ++/* ATA/ATAPI Commands pre T13 Spec */ ++#define WIN_NOP 0x00 ++/* ++ * 0x01->0x02 Reserved ++ */ ++#define CFA_REQ_EXT_ERROR_CODE 0x03 /* CFA Request Extended Error Code */ ++/* ++ * 0x04->0x07 Reserved ++ */ ++#define WIN_SRST 0x08 /* ATAPI soft reset command */ ++#define WIN_DEVICE_RESET 0x08 ++/* ++ * 0x09->0x0F Reserved ++ */ ++#define WIN_RECAL 0x10 ++#define WIN_RESTORE WIN_RECAL ++/* ++ * 0x10->0x1F Reserved ++ */ ++#define WIN_READ 0x20 /* 28-Bit */ ++#define WIN_READ_ONCE 0x21 /* 28-Bit without retries */ ++#define WIN_READ_LONG 0x22 /* 28-Bit */ ++#define WIN_READ_LONG_ONCE 0x23 /* 28-Bit without retries */ ++#define WIN_READ_EXT 0x24 /* 48-Bit */ ++#define WIN_READDMA_EXT 0x25 /* 48-Bit */ ++#define WIN_READDMA_QUEUED_EXT 0x26 /* 48-Bit */ ++#define WIN_READ_NATIVE_MAX_EXT 0x27 /* 48-Bit */ ++/* ++ * 0x28 ++ */ ++#define WIN_MULTREAD_EXT 0x29 /* 48-Bit */ ++/* ++ * 0x2A->0x2F Reserved ++ */ ++#define WIN_WRITE 0x30 /* 28-Bit */ ++#define WIN_WRITE_ONCE 0x31 /* 28-Bit without retries */ ++#define WIN_WRITE_LONG 0x32 /* 28-Bit */ ++#define WIN_WRITE_LONG_ONCE 0x33 /* 28-Bit without retries */ ++#define WIN_WRITE_EXT 0x34 /* 48-Bit */ ++#define WIN_WRITEDMA_EXT 0x35 /* 48-Bit */ ++#define WIN_WRITEDMA_QUEUED_EXT 0x36 /* 48-Bit */ ++#define WIN_SET_MAX_EXT 0x37 /* 48-Bit */ ++#define CFA_WRITE_SECT_WO_ERASE 0x38 /* CFA Write Sectors without erase */ ++#define WIN_MULTWRITE_EXT 0x39 /* 48-Bit */ ++/* ++ * 0x3A->0x3B Reserved ++ */ ++#define WIN_WRITE_VERIFY 0x3C /* 28-Bit */ ++/* ++ * 0x3D->0x3F Reserved ++ */ ++#define WIN_VERIFY 0x40 /* 28-Bit - Read Verify Sectors */ ++#define WIN_VERIFY_ONCE 0x41 /* 28-Bit - without retries */ ++#define WIN_VERIFY_EXT 0x42 /* 48-Bit */ ++/* ++ * 0x43->0x4F Reserved ++ */ ++#define WIN_FORMAT 0x50 ++/* ++ * 0x51->0x5F Reserved ++ */ ++#define WIN_INIT 0x60 ++/* ++ * 0x61->0x5F Reserved ++ */ ++#define WIN_SEEK 0x70 /* 0x70-0x7F Reserved */ ++#define CFA_TRANSLATE_SECTOR 0x87 /* CFA Translate Sector */ ++#define WIN_DIAGNOSE 0x90 ++#define WIN_SPECIFY 0x91 /* set drive geometry translation */ ++#define WIN_DOWNLOAD_MICROCODE 0x92 ++#define WIN_STANDBYNOW2 0x94 ++#define WIN_STANDBY2 0x96 ++#define WIN_SETIDLE2 0x97 ++#define WIN_CHECKPOWERMODE2 0x98 ++#define WIN_SLEEPNOW2 0x99 ++/* ++ * 0x9A VENDOR ++ */ ++#define WIN_PACKETCMD 0xA0 /* Send a packet command. */ ++#define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */ ++#define WIN_QUEUED_SERVICE 0xA2 ++#define WIN_SMART 0xB0 /* self-monitoring and reporting */ ++#define CFA_ERASE_SECTORS 0xC0 ++#define WIN_MULTREAD 0xC4 /* read sectors using multiple mode*/ ++#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */ ++#define WIN_SETMULT 0xC6 /* enable/disable multiple mode */ ++#define WIN_READDMA_QUEUED 0xC7 /* read sectors using Queued DMA transfers */ ++#define WIN_READDMA 0xC8 /* read sectors using DMA transfers */ ++#define WIN_READDMA_ONCE 0xC9 /* 28-Bit - without retries */ ++#define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */ ++#define WIN_WRITEDMA_ONCE 0xCB /* 28-Bit - without retries */ ++#define WIN_WRITEDMA_QUEUED 0xCC /* write sectors using Queued DMA transfers */ ++#define CFA_WRITE_MULTI_WO_ERASE 0xCD /* CFA Write multiple without erase */ ++#define WIN_GETMEDIASTATUS 0xDA ++#define WIN_ACKMEDIACHANGE 0xDB /* ATA-1, ATA-2 vendor */ ++#define WIN_POSTBOOT 0xDC ++#define WIN_PREBOOT 0xDD ++#define WIN_DOORLOCK 0xDE /* lock door on removable drives */ ++#define WIN_DOORUNLOCK 0xDF /* unlock door on removable drives */ ++#define WIN_STANDBYNOW1 0xE0 ++#define WIN_IDLEIMMEDIATE 0xE1 /* force drive to become "ready" */ ++#define WIN_STANDBY 0xE2 /* Set device in Standby Mode */ ++#define WIN_SETIDLE1 0xE3 ++#define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */ ++#define WIN_CHECKPOWERMODE1 0xE5 ++#define WIN_SLEEPNOW1 0xE6 ++#define WIN_FLUSH_CACHE 0xE7 ++#define WIN_WRITE_BUFFER 0xE8 /* force write only 1 sector */ ++#define WIN_WRITE_SAME 0xE9 /* read ata-2 to use */ ++ /* SET_FEATURES 0x22 or 0xDD */ ++#define WIN_FLUSH_CACHE_EXT 0xEA /* 48-Bit */ ++#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */ ++#define WIN_MEDIAEJECT 0xED ++#define WIN_IDENTIFY_DMA 0xEE /* same as WIN_IDENTIFY, but DMA */ ++#define WIN_SETFEATURES 0xEF /* set special drive features */ ++#define EXABYTE_ENABLE_NEST 0xF0 ++#define WIN_SECURITY_SET_PASS 0xF1 ++#define WIN_SECURITY_UNLOCK 0xF2 ++#define WIN_SECURITY_ERASE_PREPARE 0xF3 ++#define WIN_SECURITY_ERASE_UNIT 0xF4 ++#define WIN_SECURITY_FREEZE_LOCK 0xF5 ++#define WIN_SECURITY_DISABLE 0xF6 ++#define WIN_READ_NATIVE_MAX 0xF8 /* return the native maximum address */ ++#define WIN_SET_MAX 0xF9 ++#define DISABLE_SEAGATE 0xFB ++ ++/* WIN_SMART sub-commands */ ++ ++#define SMART_READ_VALUES 0xD0 ++#define SMART_READ_THRESHOLDS 0xD1 ++#define SMART_AUTOSAVE 0xD2 ++#define SMART_SAVE 0xD3 ++#define SMART_IMMEDIATE_OFFLINE 0xD4 ++#define SMART_READ_LOG_SECTOR 0xD5 ++#define SMART_WRITE_LOG_SECTOR 0xD6 ++#define SMART_WRITE_THRESHOLDS 0xD7 ++#define SMART_ENABLE 0xD8 ++#define SMART_DISABLE 0xD9 ++#define SMART_STATUS 0xDA ++#define SMART_AUTO_OFFLINE 0xDB ++ ++/* Password used in TF4 & TF5 executing SMART commands */ ++ ++#define SMART_LCYL_PASS 0x4F ++#define SMART_HCYL_PASS 0xC2 ++ ++/* WIN_SETFEATURES sub-commands */ ++#define SETFEATURES_EN_8BIT 0x01 /* Enable 8-Bit Transfers */ ++#define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */ ++#define SETFEATURES_XFER 0x03 /* Set transfer mode */ ++# define XFER_UDMA_7 0x47 /* 0100|0111 */ ++# define XFER_UDMA_6 0x46 /* 0100|0110 */ ++# define XFER_UDMA_5 0x45 /* 0100|0101 */ ++# define XFER_UDMA_4 0x44 /* 0100|0100 */ ++# define XFER_UDMA_3 0x43 /* 0100|0011 */ ++# define XFER_UDMA_2 0x42 /* 0100|0010 */ ++# define XFER_UDMA_1 0x41 /* 0100|0001 */ ++# define XFER_UDMA_0 0x40 /* 0100|0000 */ ++# define XFER_MW_DMA_2 0x22 /* 0010|0010 */ ++# define XFER_MW_DMA_1 0x21 /* 0010|0001 */ ++# define XFER_MW_DMA_0 0x20 /* 0010|0000 */ ++# define XFER_SW_DMA_2 0x12 /* 0001|0010 */ ++# define XFER_SW_DMA_1 0x11 /* 0001|0001 */ ++# define XFER_SW_DMA_0 0x10 /* 0001|0000 */ ++# define XFER_PIO_4 0x0C /* 0000|1100 */ ++# define XFER_PIO_3 0x0B /* 0000|1011 */ ++# define XFER_PIO_2 0x0A /* 0000|1010 */ ++# define XFER_PIO_1 0x09 /* 0000|1001 */ ++# define XFER_PIO_0 0x08 /* 0000|1000 */ ++# define XFER_PIO_SLOW 0x00 /* 0000|0000 */ ++#define SETFEATURES_DIS_DEFECT 0x04 /* Disable Defect Management */ ++#define SETFEATURES_EN_APM 0x05 /* Enable advanced power management */ ++#define SETFEATURES_EN_SAME_R 0x22 /* for a region ATA-1 */ ++#define SETFEATURES_DIS_MSN 0x31 /* Disable Media Status Notification */ ++#define SETFEATURES_DIS_RETRY 0x33 /* Disable Retry */ ++#define SETFEATURES_EN_AAM 0x42 /* Enable Automatic Acoustic Management */ ++#define SETFEATURES_RW_LONG 0x44 /* Set Lenght of VS bytes */ ++#define SETFEATURES_SET_CACHE 0x54 /* Set Cache segments to SC Reg. Val */ ++#define SETFEATURES_DIS_RLA 0x55 /* Disable read look-ahead feature */ ++#define SETFEATURES_EN_RI 0x5D /* Enable release interrupt */ ++#define SETFEATURES_EN_SI 0x5E /* Enable SERVICE interrupt */ ++#define SETFEATURES_DIS_RPOD 0x66 /* Disable reverting to power on defaults */ ++#define SETFEATURES_DIS_ECC 0x77 /* Disable ECC byte count */ ++#define SETFEATURES_DIS_8BIT 0x81 /* Disable 8-Bit Transfers */ ++#define SETFEATURES_DIS_WCACHE 0x82 /* Disable write cache */ ++#define SETFEATURES_EN_DEFECT 0x84 /* Enable Defect Management */ ++#define SETFEATURES_DIS_APM 0x85 /* Disable advanced power management */ ++#define SETFEATURES_EN_ECC 0x88 /* Enable ECC byte count */ ++#define SETFEATURES_EN_MSN 0x95 /* Enable Media Status Notification */ ++#define SETFEATURES_EN_RETRY 0x99 /* Enable Retry */ ++#define SETFEATURES_EN_RLA 0xAA /* Enable read look-ahead feature */ ++#define SETFEATURES_PREFETCH 0xAB /* Sets drive prefetch value */ ++#define SETFEATURES_EN_REST 0xAC /* ATA-1 */ ++#define SETFEATURES_4B_RW_LONG 0xBB /* Set Lenght of 4 bytes */ ++#define SETFEATURES_DIS_AAM 0xC2 /* Disable Automatic Acoustic Management */ ++#define SETFEATURES_EN_RPOD 0xCC /* Enable reverting to power on defaults */ ++#define SETFEATURES_DIS_RI 0xDD /* Disable release interrupt ATAPI */ ++#define SETFEATURES_EN_SAME_M 0xDD /* for a entire device ATA-1 */ ++#define SETFEATURES_DIS_SI 0xDE /* Disable SERVICE interrupt ATAPI */ ++ ++/* WIN_SECURITY sub-commands */ ++ ++#define SECURITY_SET_PASSWORD 0xBA ++#define SECURITY_UNLOCK 0xBB ++#define SECURITY_ERASE_PREPARE 0xBC ++#define SECURITY_ERASE_UNIT 0xBD ++#define SECURITY_FREEZE_LOCK 0xBE ++#define SECURITY_DISABLE_PASSWORD 0xBF ++ ++struct hd_geometry { ++ unsigned char heads; ++ unsigned char sectors; ++ unsigned short cylinders; ++ unsigned long start; ++}; ++ ++/* BIG GEOMETRY */ ++struct hd_big_geometry { ++ unsigned char heads; ++ unsigned char sectors; ++ unsigned int cylinders; ++ unsigned long start; ++}; ++ ++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */ ++#define HDIO_GETGEO 0x0301 /* get device geometry */ ++#define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ ++#define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ ++#define HDIO_GET_QDMA 0x0305 /* get use-qdma flag */ ++ ++#define HDIO_SET_XFER 0x0306 /* set transfer rate via proc */ ++ ++#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */ ++#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ ++#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ ++#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ ++#define HDIO_GET_DMA 0x030b /* get use-dma flag */ ++#define HDIO_GET_NICE 0x030c /* get nice flags */ ++#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ ++#define HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */ ++#define HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */ ++#define HDIO_GET_ADDRESS 0x0310 /* */ ++ ++#define HDIO_GET_BUSSTATE 0x031a /* get the bus state of the hwif */ ++#define HDIO_TRISTATE_HWIF 0x031b /* execute a channel tristate */ ++#define HDIO_DRIVE_RESET 0x031c /* execute a device reset */ ++#define HDIO_DRIVE_TASKFILE 0x031d /* execute raw taskfile */ ++#define HDIO_DRIVE_TASK 0x031e /* execute task and special drive command */ ++#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ ++ ++#define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK ++ ++/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */ ++#define HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */ ++#define HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */ ++#define HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */ ++#define HDIO_SET_32BIT 0x0324 /* change io_32bit flags */ ++#define HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */ ++#define HDIO_SET_DMA 0x0326 /* change use-dma flag */ ++#define HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ ++#define HDIO_SCAN_HWIF 0x0328 /* register and (re)scan interface */ ++#define HDIO_SET_NICE 0x0329 /* set nice flags */ ++#define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */ ++#define HDIO_SET_WCACHE 0x032b /* change write cache enable-disable */ ++#define HDIO_SET_ACOUSTIC 0x032c /* change acoustic behavior */ ++#define HDIO_SET_BUSSTATE 0x032d /* set the bus state of the hwif */ ++#define HDIO_SET_QDMA 0x032e /* change use-qdma flag */ ++#define HDIO_SET_ADDRESS 0x032f /* change lba addressing modes */ ++ ++/* bus states */ ++enum { ++ BUSSTATE_OFF = 0, ++ BUSSTATE_ON, ++ BUSSTATE_TRISTATE ++}; ++ ++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ ++#define HDIO_GETGEO_BIG 0x0330 /* */ ++#define HDIO_GETGEO_BIG_RAW 0x0331 /* */ ++ ++#define HDIO_SET_IDE_SCSI 0x0338 ++#define HDIO_SET_SCSI_IDE 0x0339 ++ ++#define __NEW_HD_DRIVE_ID ++/* structure returned by HDIO_GET_IDENTITY, ++ * as per ANSI NCITS ATA6 rev.1b spec ++ */ ++struct hd_driveid { ++ unsigned short config; /* lots of obsolete bit flags */ ++ unsigned short cyls; /* Obsolete, "physical" cyls */ ++ unsigned short reserved2; /* reserved (word 2) */ ++ unsigned short heads; /* Obsolete, "physical" heads */ ++ unsigned short track_bytes; /* unformatted bytes per track */ ++ unsigned short sector_bytes; /* unformatted bytes per sector */ ++ unsigned short sectors; /* Obsolete, "physical" sectors per track */ ++ unsigned short vendor0; /* vendor unique */ ++ unsigned short vendor1; /* vendor unique */ ++ unsigned short vendor2; /* Retired vendor unique */ ++ unsigned char serial_no[20]; /* 0 = not_specified */ ++ unsigned short buf_type; /* Retired */ ++ unsigned short buf_size; /* Retired, 512 byte increments ++ * 0 = not_specified ++ */ ++ unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ ++ unsigned char fw_rev[8]; /* 0 = not_specified */ ++ unsigned char model[40]; /* 0 = not_specified */ ++ unsigned char max_multsect; /* 0=not_implemented */ ++ unsigned char vendor3; /* vendor unique */ ++ unsigned short dword_io; /* 0=not_implemented; 1=implemented */ ++ unsigned char vendor4; /* vendor unique */ ++ unsigned char capability; /* (upper byte of word 49) ++ * 3: IORDYsup ++ * 2: IORDYsw ++ * 1: LBA ++ * 0: DMA ++ */ ++ unsigned short reserved50; /* reserved (word 50) */ ++ unsigned char vendor5; /* Obsolete, vendor unique */ ++ unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ ++ unsigned char vendor6; /* Obsolete, vendor unique */ ++ unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ ++ unsigned short field_valid; /* (word 53) ++ * 2: ultra_ok word 88 ++ * 1: eide_ok words 64-70 ++ * 0: cur_ok words 54-58 ++ */ ++ unsigned short cur_cyls; /* Obsolete, logical cylinders */ ++ unsigned short cur_heads; /* Obsolete, l heads */ ++ unsigned short cur_sectors; /* Obsolete, l sectors per track */ ++ unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ ++ unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ ++ unsigned char multsect; /* current multiple sector count */ ++ unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ ++ unsigned int lba_capacity; /* Obsolete, total number of sectors */ ++ unsigned short dma_1word; /* Obsolete, single-word dma info */ ++ unsigned short dma_mword; /* multiple-word dma info */ ++ unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ ++ unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ ++ unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */ ++ unsigned short eide_pio; /* min cycle time (ns), no IORDY */ ++ unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ ++ unsigned short words69_70[2]; /* reserved words 69-70 ++ * future command overlap and queuing ++ */ ++ /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ ++ unsigned short words71_74[4]; /* reserved words 71-74 ++ * for IDENTIFY PACKET DEVICE command ++ */ ++ unsigned short queue_depth; /* (word 75) ++ * 15:5 reserved ++ * 4:0 Maximum queue depth -1 ++ */ ++ unsigned short words76_79[4]; /* reserved words 76-79 */ ++ unsigned short major_rev_num; /* (word 80) */ ++ unsigned short minor_rev_num; /* (word 81) */ ++ unsigned short command_set_1; /* (word 82) supported ++ * 15: Obsolete ++ * 14: NOP command ++ * 13: READ_BUFFER ++ * 12: WRITE_BUFFER ++ * 11: Obsolete ++ * 10: Host Protected Area ++ * 9: DEVICE Reset ++ * 8: SERVICE Interrupt ++ * 7: Release Interrupt ++ * 6: look-ahead ++ * 5: write cache ++ * 4: PACKET Command ++ * 3: Power Management Feature Set ++ * 2: Removable Feature Set ++ * 1: Security Feature Set ++ * 0: SMART Feature Set ++ */ ++ unsigned short command_set_2; /* (word 83) ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13: FLUSH CACHE EXT ++ * 12: FLUSH CACHE ++ * 11: Device Configuration Overlay ++ * 10: 48-bit Address Feature Set ++ * 9: Automatic Acoustic Management ++ * 8: SET MAX security ++ * 7: reserved 1407DT PARTIES ++ * 6: SetF sub-command Power-Up ++ * 5: Power-Up in Standby Feature Set ++ * 4: Removable Media Notification ++ * 3: APM Feature Set ++ * 2: CFA Feature Set ++ * 1: READ/WRITE DMA QUEUED ++ * 0: Download MicroCode ++ */ ++ unsigned short cfsse; /* (word 84) ++ * cmd set-feature supported extensions ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13:6 reserved ++ * 5: General Purpose Logging ++ * 4: Streaming Feature Set ++ * 3: Media Card Pass Through ++ * 2: Media Serial Number Valid ++ * 1: SMART selt-test supported ++ * 0: SMART error logging ++ */ ++ unsigned short cfs_enable_1; /* (word 85) ++ * command set-feature enabled ++ * 15: Obsolete ++ * 14: NOP command ++ * 13: READ_BUFFER ++ * 12: WRITE_BUFFER ++ * 11: Obsolete ++ * 10: Host Protected Area ++ * 9: DEVICE Reset ++ * 8: SERVICE Interrupt ++ * 7: Release Interrupt ++ * 6: look-ahead ++ * 5: write cache ++ * 4: PACKET Command ++ * 3: Power Management Feature Set ++ * 2: Removable Feature Set ++ * 1: Security Feature Set ++ * 0: SMART Feature Set ++ */ ++ unsigned short cfs_enable_2; /* (word 86) ++ * command set-feature enabled ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13: FLUSH CACHE EXT ++ * 12: FLUSH CACHE ++ * 11: Device Configuration Overlay ++ * 10: 48-bit Address Feature Set ++ * 9: Automatic Acoustic Management ++ * 8: SET MAX security ++ * 7: reserved 1407DT PARTIES ++ * 6: SetF sub-command Power-Up ++ * 5: Power-Up in Standby Feature Set ++ * 4: Removable Media Notification ++ * 3: APM Feature Set ++ * 2: CFA Feature Set ++ * 1: READ/WRITE DMA QUEUED ++ * 0: Download MicroCode ++ */ ++ unsigned short csf_default; /* (word 87) ++ * command set-feature default ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13:6 reserved ++ * 5: General Purpose Logging enabled ++ * 4: Valid CONFIGURE STREAM executed ++ * 3: Media Card Pass Through enabled ++ * 2: Media Serial Number Valid ++ * 1: SMART selt-test supported ++ * 0: SMART error logging ++ */ ++ unsigned short dma_ultra; /* (word 88) */ ++ unsigned short trseuc; /* time required for security erase */ ++ unsigned short trsEuc; /* time required for enhanced erase */ ++ unsigned short CurAPMvalues; /* current APM values */ ++ unsigned short mprc; /* master password revision code */ ++ unsigned short hw_config; /* hardware config (word 93) ++ * 15: Shall be ZERO ++ * 14: Shall be ONE ++ * 13: ++ * 12: ++ * 11: ++ * 10: ++ * 9: ++ * 8: ++ * 7: ++ * 6: ++ * 5: ++ * 4: ++ * 3: ++ * 2: ++ * 1: ++ * 0: Shall be ONE ++ */ ++ unsigned short acoustic; /* (word 94) ++ * 15:8 Vendor's recommended value ++ * 7:0 current value ++ */ ++ unsigned short msrqs; /* min stream request size */ ++ unsigned short sxfert; /* stream transfer time */ ++ unsigned short sal; /* stream access latency */ ++ unsigned int spg; /* stream performance granularity */ ++ unsigned long long lba_capacity_2;/* 48-bit total number of sectors */ ++ unsigned short words104_125[22];/* reserved words 104-125 */ ++ unsigned short last_lun; /* (word 126) */ ++ unsigned short word127; /* (word 127) Feature Set ++ * Removable Media Notification ++ * 15:2 reserved ++ * 1:0 00 = not supported ++ * 01 = supported ++ * 10 = reserved ++ * 11 = reserved ++ */ ++ unsigned short dlf; /* (word 128) ++ * device lock function ++ * 15:9 reserved ++ * 8 security level 1:max 0:high ++ * 7:6 reserved ++ * 5 enhanced erase ++ * 4 expire ++ * 3 frozen ++ * 2 locked ++ * 1 en/disabled ++ * 0 capability ++ */ ++ unsigned short csfo; /* (word 129) ++ * current set features options ++ * 15:4 reserved ++ * 3: auto reassign ++ * 2: reverting ++ * 1: read-look-ahead ++ * 0: write cache ++ */ ++ unsigned short words130_155[26];/* reserved vendor words 130-155 */ ++ unsigned short word156; /* reserved vendor word 156 */ ++ unsigned short words157_159[3];/* reserved vendor words 157-159 */ ++ unsigned short cfa_power; /* (word 160) CFA Power Mode ++ * 15 word 160 supported ++ * 14 reserved ++ * 13 ++ * 12 ++ * 11:0 ++ */ ++ unsigned short words161_175[15];/* Reserved for CFA */ ++ unsigned short words176_205[30];/* Current Media Serial Number */ ++ unsigned short words206_254[49];/* reserved words 206-254 */ ++ unsigned short integrity_word; /* (word 255) ++ * 15:8 Checksum ++ * 7:0 Signature ++ */ ++}; ++ ++/* ++ * IDE "nice" flags. These are used on a per drive basis to determine ++ * when to be nice and give more bandwidth to the other devices which ++ * share the same IDE bus. ++ */ ++#define IDE_NICE_DSC_OVERLAP (0) /* per the DSC overlap protocol */ ++#define IDE_NICE_ATAPI_OVERLAP (1) /* not supported yet */ ++#define IDE_NICE_0 (2) /* when sure that it won't affect us */ ++#define IDE_NICE_1 (3) /* when probably won't affect us much */ ++#define IDE_NICE_2 (4) /* when we know it's on our expense */ ++ ++#ifdef __KERNEL__ ++/* ++ * These routines are used for kernel command line parameters from main.c: ++ */ ++#include ++ ++#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ++int ide_register(int io_port, int ctl_port, int irq); ++int ide_unregister(unsigned int); ++#endif /* CONFIG_BLK_DEV_IDE || CONFIG_BLK_DEV_IDE_MODULE */ ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _LINUX_HDREG_H */ +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/ioctl.h lilo-22.5.9/kernel-headers/linux/ioctl.h +--- lilo-22.5.9-orig/kernel-headers/linux/ioctl.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/ioctl.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,7 @@ ++#ifndef _LINUX_IOCTL_H ++#define _LINUX_IOCTL_H ++ ++#include ++ ++#endif /* _LINUX_IOCTL_H */ ++ +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/lvm.h lilo-22.5.9/kernel-headers/linux/lvm.h +--- lilo-22.5.9-orig/kernel-headers/linux/lvm.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/lvm.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,756 @@ ++/* ++ * include/linux/lvm.h ++ * kernel/lvm.h ++ * tools/lib/lvm.h ++ * ++ * Copyright (C) 1997 - 2002 Heinz Mauelshagen, Sistina Software ++ * ++ * February-November 1997 ++ * May-July 1998 ++ * January-March,July,September,October,Dezember 1999 ++ * January,February,July,November 2000 ++ * January-March,June,July 2001 ++ * May 2002 ++ * ++ * lvm 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. ++ * ++ * lvm 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 GNU CC; see the file COPYING. If not, write to ++ * the Free Software Foundation, 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++/* ++ * Changelog ++ * ++ * 10/10/1997 - beginning of new structure creation ++ * 12/05/1998 - incorporated structures from lvm_v1.h and deleted lvm_v1.h ++ * 07/06/1998 - avoided LVM_KMALLOC_MAX define by using vmalloc/vfree ++ * instead of kmalloc/kfree ++ * 01/07/1998 - fixed wrong LVM_MAX_SIZE ++ * 07/07/1998 - extended pe_t structure by ios member (for statistic) ++ * 02/08/1998 - changes for official char/block major numbers ++ * 07/08/1998 - avoided init_module() and cleanup_module() to be static ++ * 29/08/1998 - seprated core and disk structure type definitions ++ * 01/09/1998 - merged kernel integration version (mike) ++ * 20/01/1999 - added LVM_PE_DISK_OFFSET macro for use in ++ * vg_read_with_pv_and_lv(), pv_move_pe(), pv_show_pe_text()... ++ * 18/02/1999 - added definition of time_disk_t structure for; ++ * keeps time stamps on disk for nonatomic writes (future) ++ * 15/03/1999 - corrected LV() and VG() macro definition to use argument ++ * instead of minor ++ * 03/07/1999 - define for genhd.c name handling ++ * 23/07/1999 - implemented snapshot part ++ * 08/12/1999 - changed LVM_LV_SIZE_MAX macro to reflect current 1TB limit ++ * 01/01/2000 - extended lv_v2 core structure by wait_queue member ++ * 12/02/2000 - integrated Andrea Arcagnelli's snapshot work ++ * 18/02/2000 - seperated user and kernel space parts by ++ * #ifdef them with __KERNEL__ ++ * 08/03/2000 - implemented cluster/shared bits for vg_access ++ * 26/06/2000 - implemented snapshot persistency and resizing support ++ * 02/11/2000 - added hash table size member to lv structure ++ * 12/11/2000 - removed unneeded timestamp definitions ++ * 24/12/2000 - removed LVM_TO_{CORE,DISK}*, use cpu_{from, to}_le* ++ * instead - Christoph Hellwig ++ * 22/01/2001 - Change ulong to uint32_t ++ * 14/02/2001 - changed LVM_SNAPSHOT_MIN_CHUNK to 1 page ++ * 20/02/2001 - incremented IOP version to 11 because of incompatible ++ * change in VG activation (in order to support devfs better) ++ * 01/03/2001 - Revert to IOP10 and add VG_CREATE_OLD call for compatibility ++ * 08/03/2001 - new lv_t (in core) version number 5: changed page member ++ * to (struct kiobuf *) to use for COW exception table io ++ * 26/03/2001 - changed lv_v4 to lv_v5 in structure definition (HM) ++ * 21/06/2001 - changed BLOCK_SIZE back to 1024 for non S/390 ++ * 22/06/2001 - added Andreas Dilger's PE on 4k boundary alignment enhancements ++ * 19/07/2001 - added rwsem compatibility macros for 2.2 kernels ++ * 13/11/2001 - reduced userspace inclusion of kernel headers to a minimum ++ * ++ */ ++ ++ ++#ifndef _LVM_H_INCLUDE ++#define _LVM_H_INCLUDE ++ ++#define LVM_RELEASE_NAME "1.0.5+" ++#define LVM_RELEASE_DATE "22/07/2002" ++ ++#define _LVM_KERNEL_H_VERSION "LVM "LVM_RELEASE_NAME" ("LVM_RELEASE_DATE")" ++ ++#include ++ ++/* ++ * preprocessor definitions ++ */ ++/* if you like emergency reset code in the driver */ ++#define LVM_TOTAL_RESET ++ ++#ifdef __KERNEL__ ++#undef LVM_HD_NAME /* display nice names in /proc/partitions */ ++ ++/* lots of debugging output (see driver source) ++ #define DEBUG_LVM_GET_INFO ++ #define DEBUG ++ #define DEBUG_MAP ++ #define DEBUG_MAP_SIZE ++ #define DEBUG_IOCTL ++ #define DEBUG_READ ++ #define DEBUG_GENDISK ++ #define DEBUG_VG_CREATE ++ #define DEBUG_DEVICE ++ #define DEBUG_KFREE ++ */ ++ ++#include ++#include ++#include ++#include ++#else ++/* This prevents the need to include which ++ causes problems on some platforms. It's not nice but then ++ neither is the alternative. */ ++struct list_head { ++ struct list_head *next, *prev; ++}; ++#define __KERNEL__ ++#include ++#undef __KERNEL__ ++#endif /* #ifndef __KERNEL__ */ ++ ++ ++#ifdef __KERNEL__ ++#include ++ ++#include ++#endif /* #ifdef __KERNEL__ */ ++ ++ ++#include ++ ++#if !defined ( LVM_BLK_MAJOR) || !defined ( LVM_CHAR_MAJOR) ++#error Bad include/linux/major.h - LVM MAJOR undefined ++#endif ++ ++#ifdef BLOCK_SIZE ++#undef BLOCK_SIZE ++#endif ++ ++#ifdef CONFIG_ARCH_S390 ++#define BLOCK_SIZE 4096 ++#else ++#define BLOCK_SIZE 1024 ++#endif ++ ++#ifndef SECTOR_SIZE ++#define SECTOR_SIZE 512 ++#endif ++ ++/* structure version */ ++#define LVM_STRUCT_VERSION 1 ++ ++#define LVM_DIR_PREFIX "/dev/" ++ ++/* ++ * i/o protocol version ++ * ++ * defined here for the driver and defined seperate in the ++ * user land tools/lib/liblvm.h ++ * ++ */ ++#define LVM_DRIVER_IOP_VERSION 10 ++ ++#define LVM_NAME "lvm" ++#define LVM_GLOBAL "global" ++#define LVM_DIR "lvm" ++#define LVM_VG_SUBDIR "VGs" ++#define LVM_LV_SUBDIR "LVs" ++#define LVM_PV_SUBDIR "PVs" ++ ++/* ++ * VG/LV indexing macros ++ */ ++/* character minor maps directly to volume group */ ++#define VG_CHR(a) ( a) ++ ++/* block minor indexes into a volume group/logical volume indirection table */ ++#define VG_BLK(a) ( vg_lv_map[a].vg_number) ++#define LV_BLK(a) ( vg_lv_map[a].lv_number) ++ ++/* ++ * absolute limits for VGs, PVs per VG and LVs per VG ++ */ ++#define ABS_MAX_VG 99 ++#define ABS_MAX_PV 256 ++#define ABS_MAX_LV 256 /* caused by 8 bit minor */ ++ ++#define MAX_VG ABS_MAX_VG ++#define MAX_LV ABS_MAX_LV ++#define MAX_PV ABS_MAX_PV ++ ++#if ( MAX_VG > ABS_MAX_VG) ++#undef MAX_VG ++#define MAX_VG ABS_MAX_VG ++#endif ++ ++#if ( MAX_LV > ABS_MAX_LV) ++#undef MAX_LV ++#define MAX_LV ABS_MAX_LV ++#endif ++ ++ ++/* ++ * VGDA: default disk spaces and offsets ++ * ++ * there's space after the structures for later extensions. ++ * ++ * offset what size ++ * --------------- ---------------------------------- ------------ ++ * 0 physical volume structure ~500 byte ++ * ++ * 1K volume group structure ~200 byte ++ * ++ * 6K namelist of physical volumes 128 byte each ++ * ++ * 6k + n * ~300byte n logical volume structures ~300 byte each ++ * ++ * + m * 4byte m physical extent alloc. structs 4 byte each ++ * ++ * End of disk - first physical extent typically 4 megabyte ++ * PE total * ++ * PE size ++ * ++ * ++ */ ++ ++/* DONT TOUCH THESE !!! */ ++ ++ ++ ++ ++ ++ ++ ++/* ++ * LVM_PE_T_MAX corresponds to: ++ * ++ * 8KB PE size can map a ~512 MB logical volume at the cost of 1MB memory, ++ * ++ * 128MB PE size can map a 8TB logical volume at the same cost of memory. ++ * ++ * Default PE size of 4 MB gives a maximum logical volume size of 256 GB. ++ * ++ * Maximum PE size of 16GB gives a maximum logical volume size of 1024 TB. ++ * ++ * AFAIK, the actual kernels limit this to 1 TB. ++ * ++ * Should be a sufficient spectrum ;*) ++ */ ++ ++/* This is the usable size of pe_disk_t.le_num !!! v v */ ++#define LVM_PE_T_MAX ( ( 1 << ( sizeof ( uint16_t) * 8)) - 2) ++ ++#define LVM_LV_SIZE_MAX(a) ( ( long long) LVM_PE_T_MAX * (a)->pe_size > ( long long) 1024*1024/SECTOR_SIZE*1024*1024 ? ( long long) 1024*1024/SECTOR_SIZE*1024*1024 : ( long long) LVM_PE_T_MAX * (a)->pe_size) ++#define LVM_MIN_PE_SIZE ( 8192L / SECTOR_SIZE) /* 8 KB in sectors */ ++#define LVM_MAX_PE_SIZE ( 16L * 1024L * 1024L / SECTOR_SIZE * 1024) /* 16GB in sectors */ ++#define LVM_DEFAULT_PE_SIZE ( 4096L * 1024 / SECTOR_SIZE) /* 4 MB in sectors */ ++#define LVM_DEFAULT_STRIPE_SIZE 16L /* 16 KB */ ++#define LVM_MIN_STRIPE_SIZE ( PAGE_SIZE/SECTOR_SIZE) /* PAGESIZE in sectors */ ++#define LVM_MAX_STRIPE_SIZE ( 512L * 1024 / SECTOR_SIZE) /* 512 KB in sectors */ ++#define LVM_MAX_STRIPES 128 /* max # of stripes */ ++#define LVM_MAX_SIZE ( 1024LU * 1024 / SECTOR_SIZE * 1024 * 1024) /* 1TB[sectors] */ ++#define LVM_MAX_MIRRORS 2 /* future use */ ++#define LVM_MIN_READ_AHEAD 0 /* minimum read ahead sectors */ ++#define LVM_DEFAULT_READ_AHEAD 1024 /* sectors for 512k scsi segments */ ++#define LVM_MAX_READ_AHEAD 1024 /* maximum read ahead sectors */ ++#define LVM_MAX_LV_IO_TIMEOUT 60 /* seconds I/O timeout (future use) */ ++#define LVM_PARTITION 0xfe /* LVM partition id */ ++#define LVM_NEW_PARTITION 0x8e /* new LVM partition id (10/09/1999) */ ++#define LVM_PE_SIZE_PV_SIZE_REL 5 /* max relation PV size and PE size */ ++ ++#define LVM_SNAPSHOT_MAX_CHUNK 1024 /* 1024 KB */ ++#define LVM_SNAPSHOT_DEF_CHUNK 64 /* 64 KB */ ++#define LVM_SNAPSHOT_MIN_CHUNK (PAGE_SIZE/1024) /* 4 or 8 KB */ ++ ++#define UNDEF -1 ++ ++/* ++ * ioctls ++ * FIXME: the last parameter to _IO{W,R,WR} is a data type. The macro will ++ * expand this using sizeof(), so putting "1" there is misleading ++ * because sizeof(1) = sizeof(int) = sizeof(2) = 4 on a 32-bit machine! ++ */ ++/* volume group */ ++#define VG_CREATE_OLD _IOW ( 0xfe, 0x00, 1) ++#define VG_REMOVE _IOW ( 0xfe, 0x01, 1) ++ ++#define VG_EXTEND _IOW ( 0xfe, 0x03, 1) ++#define VG_REDUCE _IOW ( 0xfe, 0x04, 1) ++ ++#define VG_STATUS _IOWR ( 0xfe, 0x05, 1) ++#define VG_STATUS_GET_COUNT _IOWR ( 0xfe, 0x06, 1) ++#define VG_STATUS_GET_NAMELIST _IOWR ( 0xfe, 0x07, 1) ++ ++#define VG_SET_EXTENDABLE _IOW ( 0xfe, 0x08, 1) ++#define VG_RENAME _IOW ( 0xfe, 0x09, 1) ++ ++/* Since 0.9beta6 */ ++#define VG_CREATE _IOW ( 0xfe, 0x0a, 1) ++ ++/* logical volume */ ++#define LV_CREATE _IOW ( 0xfe, 0x20, 1) ++#define LV_REMOVE _IOW ( 0xfe, 0x21, 1) ++ ++#define LV_ACTIVATE _IO ( 0xfe, 0x22) ++#define LV_DEACTIVATE _IO ( 0xfe, 0x23) ++ ++#define LV_EXTEND _IOW ( 0xfe, 0x24, 1) ++#define LV_REDUCE _IOW ( 0xfe, 0x25, 1) ++ ++#define LV_STATUS_BYNAME _IOWR ( 0xfe, 0x26, 1) ++#define LV_STATUS_BYINDEX _IOWR ( 0xfe, 0x27, 1) ++ ++#define LV_SET_ACCESS _IOW ( 0xfe, 0x28, 1) ++#define LV_SET_ALLOCATION _IOW ( 0xfe, 0x29, 1) ++#define LV_SET_STATUS _IOW ( 0xfe, 0x2a, 1) ++ ++#define LE_REMAP _IOW ( 0xfe, 0x2b, 1) ++ ++#define LV_SNAPSHOT_USE_RATE _IOWR ( 0xfe, 0x2c, 1) ++ ++#define LV_STATUS_BYDEV _IOWR ( 0xfe, 0x2e, 1) ++ ++#define LV_RENAME _IOW ( 0xfe, 0x2f, 1) ++ ++#define LV_BMAP _IOWR ( 0xfe, 0x30, 1) ++ ++ ++/* physical volume */ ++#define PV_STATUS _IOWR ( 0xfe, 0x40, 1) ++#define PV_CHANGE _IOWR ( 0xfe, 0x41, 1) ++#define PV_FLUSH _IOW ( 0xfe, 0x42, 1) ++ ++/* physical extent */ ++#define PE_LOCK_UNLOCK _IOW ( 0xfe, 0x50, 1) ++ ++/* i/o protocol version */ ++#define LVM_GET_IOP_VERSION _IOR ( 0xfe, 0x98, 1) ++ ++#ifdef LVM_TOTAL_RESET ++/* special reset function for testing purposes */ ++#define LVM_RESET _IO ( 0xfe, 0x99) ++#endif ++ ++/* lock the logical volume manager */ ++#if LVM_DRIVER_IOP_VERSION > 11 ++#define LVM_LOCK_LVM _IO ( 0xfe, 0x9A) ++#else ++/* This is actually the same as _IO ( 0xff, 0x00), oops. Remove for IOP 12+ */ ++#define LVM_LOCK_LVM _IO ( 0xfe, 0x100) ++#endif ++/* END ioctls */ ++ ++ ++/* ++ * Status flags ++ */ ++/* volume group */ ++#define VG_ACTIVE 0x01 /* vg_status */ ++#define VG_EXPORTED 0x02 /* " */ ++#define VG_EXTENDABLE 0x04 /* " */ ++ ++#define VG_READ 0x01 /* vg_access */ ++#define VG_WRITE 0x02 /* " */ ++#define VG_CLUSTERED 0x04 /* " */ ++#define VG_SHARED 0x08 /* " */ ++ ++/* logical volume */ ++#define LV_ACTIVE 0x01 /* lv_status */ ++#define LV_SPINDOWN 0x02 /* " */ ++ ++#define LV_READ 0x01 /* lv_access */ ++#define LV_WRITE 0x02 /* " */ ++#define LV_SNAPSHOT 0x04 /* " */ ++#define LV_SNAPSHOT_ORG 0x08 /* " */ ++ ++#define LV_BADBLOCK_ON 0x01 /* lv_badblock */ ++ ++#define LV_STRICT 0x01 /* lv_allocation */ ++#define LV_CONTIGUOUS 0x02 /* " */ ++ ++/* physical volume */ ++#define PV_ACTIVE 0x01 /* pv_status */ ++#define PV_ALLOCATABLE 0x02 /* pv_allocatable */ ++ ++ ++/* misc */ ++#define LVM_SNAPSHOT_DROPPED_SECTOR 1 ++ ++/* ++ * Structure definitions core/disk follow ++ * ++ * conditional conversion takes place on big endian architectures ++ * in functions * pv_copy_*(), vg_copy_*() and lv_copy_*() ++ * ++ */ ++ ++#define NAME_LEN 128 /* don't change!!! */ ++#define UUID_LEN 32 /* don't change!!! */ ++ ++/* copy on write tables in disk format */ ++typedef struct lv_COW_table_disk_v1 { ++ uint64_t pv_org_number; ++ uint64_t pv_org_rsector; ++ uint64_t pv_snap_number; ++ uint64_t pv_snap_rsector; ++} lv_COW_table_disk_t; ++ ++/* remap physical sector/rdev pairs including hash */ ++typedef struct lv_block_exception_v1 { ++ struct list_head hash; ++ uint32_t rsector_org; ++ kdev_t rdev_org; ++ uint32_t rsector_new; ++ kdev_t rdev_new; ++} lv_block_exception_t; ++ ++/* disk stored pe information */ ++typedef struct { ++ uint16_t lv_num; ++ uint16_t le_num; ++} pe_disk_t; ++ ++/* disk stored PV, VG, LV and PE size and offset information */ ++typedef struct { ++ uint32_t base; ++ uint32_t size; ++} lvm_disk_data_t; ++ ++ ++/* ++ * physical volume structures ++ */ ++ ++/* core */ ++typedef struct pv_v2 { ++ char id[2]; /* Identifier */ ++ unsigned short version; /* HM lvm version */ ++ lvm_disk_data_t pv_on_disk; ++ lvm_disk_data_t vg_on_disk; ++ lvm_disk_data_t pv_uuidlist_on_disk; ++ lvm_disk_data_t lv_on_disk; ++ lvm_disk_data_t pe_on_disk; ++ char pv_name[NAME_LEN]; ++ char vg_name[NAME_LEN]; ++ char system_id[NAME_LEN]; /* for vgexport/vgimport */ ++ kdev_t pv_dev; ++ uint pv_number; ++ uint pv_status; ++ uint pv_allocatable; ++ uint pv_size; /* HM */ ++ uint lv_cur; ++ uint pe_size; ++ uint pe_total; ++ uint pe_allocated; ++ uint pe_stale; /* for future use */ ++ pe_disk_t *pe; /* HM */ ++ struct block_device *bd; ++ char pv_uuid[UUID_LEN+1]; ++ ++#ifndef __KERNEL__ ++ uint32_t pe_start; /* in sectors */ ++#endif ++} pv_t; ++ ++ ++/* disk */ ++typedef struct pv_disk_v2 { ++ uint8_t id[2]; /* Identifier */ ++ uint16_t version; /* HM lvm version */ ++ lvm_disk_data_t pv_on_disk; ++ lvm_disk_data_t vg_on_disk; ++ lvm_disk_data_t pv_uuidlist_on_disk; ++ lvm_disk_data_t lv_on_disk; ++ lvm_disk_data_t pe_on_disk; ++ uint8_t pv_uuid[NAME_LEN]; ++ uint8_t vg_name[NAME_LEN]; ++ uint8_t system_id[NAME_LEN]; /* for vgexport/vgimport */ ++ uint32_t pv_major; ++ uint32_t pv_number; ++ uint32_t pv_status; ++ uint32_t pv_allocatable; ++ uint32_t pv_size; /* HM */ ++ uint32_t lv_cur; ++ uint32_t pe_size; ++ uint32_t pe_total; ++ uint32_t pe_allocated; ++ ++ /* new in struct version 2 */ ++ uint32_t pe_start; /* in sectors */ ++ ++} pv_disk_t; ++ ++ ++/* ++ * Structures for Logical Volume (LV) ++ */ ++ ++/* core PE information */ ++typedef struct { ++ kdev_t dev; ++ uint32_t pe; /* to be changed if > 2TB */ ++ uint32_t reads; ++ uint32_t writes; ++} pe_t; ++ ++typedef struct { ++ char lv_name[NAME_LEN]; ++ kdev_t old_dev; ++ kdev_t new_dev; ++ uint32_t old_pe; ++ uint32_t new_pe; ++} le_remap_req_t; ++ ++typedef struct lv_bmap { ++ uint32_t lv_block; ++ dev_t lv_dev; ++} lv_bmap_t; ++ ++/* ++ * Structure Logical Volume (LV) Version 3 ++ */ ++ ++/* core */ ++typedef struct lv_v5 { ++ char lv_name[NAME_LEN]; ++ char vg_name[NAME_LEN]; ++ uint lv_access; ++ uint lv_status; ++ uint lv_open; /* HM */ ++ kdev_t lv_dev; /* HM */ ++ uint lv_number; /* HM */ ++ uint lv_mirror_copies; /* for future use */ ++ uint lv_recovery; /* " */ ++ uint lv_schedule; /* " */ ++ uint lv_size; ++ pe_t *lv_current_pe; /* HM */ ++ uint lv_current_le; /* for future use */ ++ uint lv_allocated_le; ++ uint lv_stripes; ++ uint lv_stripesize; ++ uint lv_badblock; /* for future use */ ++ uint lv_allocation; ++ uint lv_io_timeout; /* for future use */ ++ uint lv_read_ahead; ++ ++ /* delta to version 1 starts here */ ++ struct lv_v5 *lv_snapshot_org; ++ struct lv_v5 *lv_snapshot_prev; ++ struct lv_v5 *lv_snapshot_next; ++ lv_block_exception_t *lv_block_exception; ++ uint lv_remap_ptr; ++ uint lv_remap_end; ++ uint lv_chunk_size; ++ uint lv_snapshot_minor; ++#ifdef __KERNEL__ ++ struct kiobuf *lv_iobuf; ++ struct kiobuf *lv_COW_table_iobuf; ++ struct rw_semaphore lv_lock; ++ struct list_head *lv_snapshot_hash_table; ++ uint32_t lv_snapshot_hash_table_size; ++ uint32_t lv_snapshot_hash_mask; ++ wait_queue_head_t lv_snapshot_wait; ++ int lv_snapshot_use_rate; ++ struct vg_v3 *vg; ++ ++ uint lv_allocated_snapshot_le; ++#else ++ char dummy[200]; ++#endif ++} lv_t; ++ ++/* disk */ ++typedef struct lv_disk_v3 { ++ uint8_t lv_name[NAME_LEN]; ++ uint8_t vg_name[NAME_LEN]; ++ uint32_t lv_access; ++ uint32_t lv_status; ++ uint32_t lv_open; /* HM */ ++ uint32_t lv_dev; /* HM */ ++ uint32_t lv_number; /* HM */ ++ uint32_t lv_mirror_copies; /* for future use */ ++ uint32_t lv_recovery; /* " */ ++ uint32_t lv_schedule; /* " */ ++ uint32_t lv_size; ++ uint32_t lv_snapshot_minor;/* minor number of original */ ++ uint16_t lv_chunk_size; /* chunk size of snapshot */ ++ uint16_t dummy; ++ uint32_t lv_allocated_le; ++ uint32_t lv_stripes; ++ uint32_t lv_stripesize; ++ uint32_t lv_badblock; /* for future use */ ++ uint32_t lv_allocation; ++ uint32_t lv_io_timeout; /* for future use */ ++ uint32_t lv_read_ahead; /* HM */ ++} lv_disk_t; ++ ++/* ++ * Structure Volume Group (VG) Version 1 ++ */ ++ ++/* core */ ++typedef struct vg_v3 { ++ char vg_name[NAME_LEN]; /* volume group name */ ++ uint vg_number; /* volume group number */ ++ uint vg_access; /* read/write */ ++ uint vg_status; /* active or not */ ++ uint lv_max; /* maximum logical volumes */ ++ uint lv_cur; /* current logical volumes */ ++ uint lv_open; /* open logical volumes */ ++ uint pv_max; /* maximum physical volumes */ ++ uint pv_cur; /* current physical volumes FU */ ++ uint pv_act; /* active physical volumes */ ++ uint dummy; /* was obsolete max_pe_per_pv */ ++ uint vgda; /* volume group descriptor arrays FU */ ++ uint pe_size; /* physical extent size in sectors */ ++ uint pe_total; /* total of physical extents */ ++ uint pe_allocated; /* allocated physical extents */ ++ uint pvg_total; /* physical volume groups FU */ ++ struct proc_dir_entry *proc; ++ pv_t *pv[ABS_MAX_PV + 1]; /* physical volume struct pointers */ ++ lv_t *lv[ABS_MAX_LV + 1]; /* logical volume struct pointers */ ++ char vg_uuid[UUID_LEN+1]; /* volume group UUID */ ++#ifdef __KERNEL__ ++ struct proc_dir_entry *vg_dir_pde; ++ struct proc_dir_entry *lv_subdir_pde; ++ struct proc_dir_entry *pv_subdir_pde; ++#else ++ char dummy1[200]; ++#endif ++} vg_t; ++ ++ ++/* disk */ ++typedef struct vg_disk_v2 { ++ uint8_t vg_uuid[UUID_LEN]; /* volume group UUID */ ++ uint8_t vg_name_dummy[NAME_LEN-UUID_LEN]; /* rest of v1 VG name */ ++ uint32_t vg_number; /* volume group number */ ++ uint32_t vg_access; /* read/write */ ++ uint32_t vg_status; /* active or not */ ++ uint32_t lv_max; /* maximum logical volumes */ ++ uint32_t lv_cur; /* current logical volumes */ ++ uint32_t lv_open; /* open logical volumes */ ++ uint32_t pv_max; /* maximum physical volumes */ ++ uint32_t pv_cur; /* current physical volumes FU */ ++ uint32_t pv_act; /* active physical volumes */ ++ uint32_t dummy; ++ uint32_t vgda; /* volume group descriptor arrays FU */ ++ uint32_t pe_size; /* physical extent size in sectors */ ++ uint32_t pe_total; /* total of physical extents */ ++ uint32_t pe_allocated; /* allocated physical extents */ ++ uint32_t pvg_total; /* physical volume groups FU */ ++} vg_disk_t; ++ ++ ++/* ++ * Request structures for ioctls ++ */ ++ ++/* Request structure PV_STATUS_BY_NAME... */ ++typedef struct { ++ char pv_name[NAME_LEN]; ++ pv_t *pv; ++} pv_status_req_t, pv_change_req_t; ++ ++/* Request structure PV_FLUSH */ ++typedef struct { ++ char pv_name[NAME_LEN]; ++ kdev_t pv_dev; ++} pv_flush_req_t; ++ ++ ++/* Request structure PE_MOVE */ ++typedef struct { ++ enum { ++ LOCK_PE, UNLOCK_PE ++ } lock; ++ struct { ++ kdev_t lv_dev; ++ kdev_t pv_dev; ++ uint32_t pv_offset; ++ } data; ++} pe_lock_req_t; ++ ++ ++/* Request structure LV_STATUS_BYNAME */ ++typedef struct { ++ char lv_name[NAME_LEN]; ++ lv_t *lv; ++} lv_status_byname_req_t, lv_req_t; ++ ++/* Request structure LV_STATUS_BYINDEX */ ++typedef struct { ++ uint32_t lv_index; ++ lv_t *lv; ++ /* Transfer size because user space and kernel space differ */ ++ ushort size; ++} lv_status_byindex_req_t; ++ ++/* Request structure LV_STATUS_BYDEV... */ ++typedef struct { ++ dev_t dev; ++ lv_t *lv; ++} lv_status_bydev_req_t; ++ ++ ++/* Request structure LV_SNAPSHOT_USE_RATE */ ++typedef struct { ++ int block; ++ int rate; ++} lv_snapshot_use_rate_req_t; ++ ++ ++ ++/* useful inlines */ ++static inline ulong round_up(ulong n, ulong size) { ++ size--; ++ return (n + size) & ~size; ++} ++ ++static inline ulong div_up(ulong n, ulong size) { ++ return round_up(n, size) / size; ++} ++ ++/* FIXME: nasty capital letters */ ++static int inline LVM_GET_COW_TABLE_CHUNKS_PER_PE(vg_t *vg, lv_t *lv) { ++ return vg->pe_size / lv->lv_chunk_size; ++} ++ ++static int inline LVM_GET_COW_TABLE_ENTRIES_PER_PE(vg_t *vg, lv_t *lv) { ++ ulong chunks = vg->pe_size / lv->lv_chunk_size; ++ ulong entry_size = sizeof(lv_COW_table_disk_t); ++ ulong chunk_size = lv->lv_chunk_size * SECTOR_SIZE; ++ ulong entries = (vg->pe_size * SECTOR_SIZE) / ++ (entry_size + chunk_size); ++ ++ if(chunks < 2) ++ return 0; ++ ++ for(; entries; entries--) ++ if((div_up(entries * entry_size, chunk_size) + entries) <= ++ chunks) ++ break; ++ ++ return entries; ++} ++ ++ ++#endif /* #ifndef _LVM_H_INCLUDE */ ++ +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/major.h lilo-22.5.9/kernel-headers/linux/major.h +--- lilo-22.5.9-orig/kernel-headers/linux/major.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/major.h 2004-07-10 02:59:15.000000000 +0200 +@@ -0,0 +1,198 @@ ++#ifndef _LINUX_MAJOR_H ++#define _LINUX_MAJOR_H ++ ++/* ++ * This file has definitions for major device numbers. ++ * For the device number assignments, see Documentation/devices.txt. ++ */ ++ ++/* limits */ ++ ++/* ++ * Important: Don't change this to 256. Major number 255 is and must be ++ * reserved for future expansion into a larger dev_t space. ++ */ ++#define MAX_CHRDEV 255 ++#define MAX_BLKDEV 255 ++ ++#define UNNAMED_MAJOR 0 ++#define MEM_MAJOR 1 ++#define RAMDISK_MAJOR 1 ++#define FLOPPY_MAJOR 2 ++#define PTY_MASTER_MAJOR 2 ++#define IDE0_MAJOR 3 ++#define PTY_SLAVE_MAJOR 3 ++#define HD_MAJOR IDE0_MAJOR ++#define TTY_MAJOR 4 ++#define TTYAUX_MAJOR 5 ++#define LP_MAJOR 6 ++#define VCS_MAJOR 7 ++#define LOOP_MAJOR 7 ++#define SCSI_DISK0_MAJOR 8 ++#define SCSI_TAPE_MAJOR 9 ++#define MD_MAJOR 9 ++#define MISC_MAJOR 10 ++#define SCSI_CDROM_MAJOR 11 ++#define MUX_MAJOR 11 /* PA-RISC only */ ++#define QIC02_TAPE_MAJOR 12 ++#define XT_DISK_MAJOR 13 ++#define SOUND_MAJOR 14 ++#define CDU31A_CDROM_MAJOR 15 ++#define JOYSTICK_MAJOR 15 ++#define GOLDSTAR_CDROM_MAJOR 16 ++#define OPTICS_CDROM_MAJOR 17 ++#define SANYO_CDROM_MAJOR 18 ++#define CYCLADES_MAJOR 19 ++#define CYCLADESAUX_MAJOR 20 ++#define MITSUMI_X_CDROM_MAJOR 20 ++#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */ ++#define SCSI_GENERIC_MAJOR 21 ++#define Z8530_MAJOR 34 ++#define DIGI_MAJOR 23 ++#define IDE1_MAJOR 22 ++#define DIGICU_MAJOR 22 ++#define MITSUMI_CDROM_MAJOR 23 ++#define CDU535_CDROM_MAJOR 24 ++#define STL_SERIALMAJOR 24 ++#define MATSUSHITA_CDROM_MAJOR 25 ++#define STL_CALLOUTMAJOR 25 ++#define MATSUSHITA_CDROM2_MAJOR 26 ++#define QIC117_TAPE_MAJOR 27 ++#define MATSUSHITA_CDROM3_MAJOR 27 ++#define MATSUSHITA_CDROM4_MAJOR 28 ++#define STL_SIOMEMMAJOR 28 ++#define ACSI_MAJOR 28 ++#define AZTECH_CDROM_MAJOR 29 ++#define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */ ++#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */ ++#define CM206_CDROM_MAJOR 32 ++#define IDE2_MAJOR 33 ++#define IDE3_MAJOR 34 ++#define XPRAM_MAJOR 35 /* expanded storage on S/390 = "slow ram" */ ++ /* proposed by Peter */ ++#define NETLINK_MAJOR 36 ++#define PS2ESDI_MAJOR 36 ++#define IDETAPE_MAJOR 37 ++#define Z2RAM_MAJOR 37 ++#define APBLOCK_MAJOR 38 /* AP1000 Block device */ ++#define DDV_MAJOR 39 /* AP1000 DDV block device */ ++#define NBD_MAJOR 43 /* Network block device */ ++#define RISCOM8_NORMAL_MAJOR 48 ++#define DAC960_MAJOR 48 /* 48..55 */ ++#define RISCOM8_CALLOUT_MAJOR 49 ++#define MKISS_MAJOR 55 ++#define DSP56K_MAJOR 55 /* DSP56001 processor device */ ++ ++#define IDE4_MAJOR 56 ++#define IDE5_MAJOR 57 ++ ++#define LVM_BLK_MAJOR 58 /* Logical Volume Manager */ ++ ++#define SCSI_DISK1_MAJOR 65 ++#define SCSI_DISK2_MAJOR 66 ++#define SCSI_DISK3_MAJOR 67 ++#define SCSI_DISK4_MAJOR 68 ++#define SCSI_DISK5_MAJOR 69 ++#define SCSI_DISK6_MAJOR 70 ++#define SCSI_DISK7_MAJOR 71 ++ ++ ++#define COMPAQ_SMART2_MAJOR 72 ++#define COMPAQ_SMART2_MAJOR1 73 ++#define COMPAQ_SMART2_MAJOR2 74 ++#define COMPAQ_SMART2_MAJOR3 75 ++#define COMPAQ_SMART2_MAJOR4 76 ++#define COMPAQ_SMART2_MAJOR5 77 ++#define COMPAQ_SMART2_MAJOR6 78 ++#define COMPAQ_SMART2_MAJOR7 79 ++ ++#define SPECIALIX_NORMAL_MAJOR 75 ++#define SPECIALIX_CALLOUT_MAJOR 76 ++ ++#define COMPAQ_CISS_MAJOR 104 ++#define COMPAQ_CISS_MAJOR1 105 ++#define COMPAQ_CISS_MAJOR2 106 ++#define COMPAQ_CISS_MAJOR3 107 ++#define COMPAQ_CISS_MAJOR4 108 ++#define COMPAQ_CISS_MAJOR5 109 ++#define COMPAQ_CISS_MAJOR6 110 ++#define COMPAQ_CISS_MAJOR7 111 ++ ++#define ATARAID_MAJOR 114 ++ ++#define DASD_MAJOR 94 /* Official assignations from Peter */ ++ ++#define MDISK_MAJOR 95 /* Official assignations from Peter */ ++ ++#define I2O_MAJOR 80 /* 80->87 */ ++ ++#define IDE6_MAJOR 88 ++#define IDE7_MAJOR 89 ++#define IDE8_MAJOR 90 ++#define IDE9_MAJOR 91 ++ ++#define UBD_MAJOR 98 ++ ++#define AURORA_MAJOR 79 ++ ++#define JSFD_MAJOR 99 ++ ++#define PHONE_MAJOR 100 ++ ++#define LVM_CHAR_MAJOR 109 /* Logical Volume Manager */ ++ ++#define UMEM_MAJOR 116 /* http://www.umem.com/ Battery Backed RAM */ ++ ++#define RTF_MAJOR 150 ++#define RAW_MAJOR 162 ++ ++#define USB_ACM_MAJOR 166 ++#define USB_ACM_AUX_MAJOR 167 ++#define USB_CHAR_MAJOR 180 ++ ++#define UNIX98_PTY_MASTER_MAJOR 128 ++#define UNIX98_PTY_MAJOR_COUNT 8 ++#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT) ++ ++#define VXVM_MAJOR 199 /* VERITAS volume i/o driver */ ++#define VXSPEC_MAJOR 200 /* VERITAS volume config driver */ ++#define VXDMP_MAJOR 201 /* VERITAS volume multipath driver */ ++ ++#define MSR_MAJOR 202 ++#define CPUID_MAJOR 203 ++ ++#define OSST_MAJOR 206 /* OnStream-SCx0 SCSI tape */ ++ ++#define IBM_TTY3270_MAJOR 227 /* Official allocations now */ ++#define IBM_FS3270_MAJOR 228 ++ ++/* ++ * Tests for SCSI devices. ++ */ ++ ++#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \ ++ ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR)) ++ ++#define SCSI_BLK_MAJOR(M) \ ++ (SCSI_DISK_MAJOR(M) \ ++ || (M) == SCSI_CDROM_MAJOR) ++ ++static __inline__ int scsi_blk_major(int m) { ++ return SCSI_BLK_MAJOR(m); ++} ++ ++/* ++ * Tests for IDE devices ++ */ ++#define IDE_DISK_MAJOR(M) ((M) == IDE0_MAJOR || (M) == IDE1_MAJOR || \ ++ (M) == IDE2_MAJOR || (M) == IDE3_MAJOR || \ ++ (M) == IDE4_MAJOR || (M) == IDE5_MAJOR || \ ++ (M) == IDE6_MAJOR || (M) == IDE7_MAJOR || \ ++ (M) == IDE8_MAJOR || (M) == IDE9_MAJOR) ++ ++static __inline__ int ide_blk_major(int m) ++{ ++ return IDE_DISK_MAJOR(m); ++} ++ ++#endif +diff -Nur lilo-22.5.9-orig/kernel-headers/linux/unistd.h lilo-22.5.9/kernel-headers/linux/unistd.h +--- lilo-22.5.9-orig/kernel-headers/linux/unistd.h 1970-01-01 01:00:00.000000000 +0100 ++++ lilo-22.5.9/kernel-headers/linux/unistd.h 2004-07-10 02:59:14.000000000 +0200 +@@ -0,0 +1,11 @@ ++#ifndef _LINUX_UNISTD_H_ ++#define _LINUX_UNISTD_H_ ++ ++extern int errno; ++ ++/* ++ * Include machine specific syscallX macros ++ */ ++#include ++ ++#endif /* _LINUX_UNISTD_H_ */ diff --git a/packages/ia32/lilo/lilo b/packages/ia32/lilo/lilo new file mode 100644 index 0000000..1965f0e --- /dev/null +++ b/packages/ia32/lilo/lilo @@ -0,0 +1,10 @@ +# hdw - linux lilo package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 22.5.9 +# [S] 2-16 +# [D] lilo-22.5.9.tar.gz http://home.san.rr.com/johninsd/pub/linux/lilo/ + +make_conf="" +install_conf="" diff --git a/packages/ia32/nasm/nasm b/packages/ia32/nasm/nasm new file mode 100644 index 0000000..4c855bd --- /dev/null +++ b/packages/ia32/nasm/nasm @@ -0,0 +1,7 @@ +# hdw - linux nasm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.98.38 +# [S] 2-15 +# [D] nasm-0.98.38.tar.bz2 http://unc.dl.sourceforge.net/sourceforge/nasm/ diff --git a/packages/ia32/syslinux/no_syslinux_exe.patch b/packages/ia32/syslinux/no_syslinux_exe.patch new file mode 100644 index 0000000..6931b08 --- /dev/null +++ b/packages/ia32/syslinux/no_syslinux_exe.patch @@ -0,0 +1,25 @@ +--- ./Makefile.orig 2004-07-10 15:49:28.000000000 +0200 ++++ ./Makefile 2004-07-10 15:50:43.000000000 +0200 +@@ -51,11 +51,12 @@ + NASMSRC = ldlinux.asm syslinux.asm copybs.asm \ + pxelinux.asm mbr.asm isolinux.asm isolinux-debug.asm + SOURCES = $(CSRC) *.h $(NASMSRC) *.inc ++# PATCH : do not buid/install syslinux.exe ... hu! .o0( wtf ?? ) + # syslinux.exe is BTARGET so as to not require everyone to have the + # mingw suite installed + BTARGET = kwdhash.gen version.gen ldlinux.bss ldlinux.sys ldlinux.bin \ + pxelinux.0 mbr.bin isolinux.bin isolinux-debug.bin \ +- libsyslinux.a syslinux.exe $(LIB_SO) ++ libsyslinux.a $(LIB_SO) + ITARGET = syslinux.com syslinux syslinux-nomtools copybs.com gethostip \ + mkdiskimage + DOCS = COPYING NEWS README TODO BUGS *.doc sample menu com32 +@@ -68,7 +69,7 @@ + INSTALL_BIN = syslinux gethostip ppmtolss16 lss16toppm + # Things to install in /usr/lib/syslinux + INSTALL_AUX = pxelinux.0 isolinux.bin isolinux-debug.bin \ +- syslinux.com syslinux.exe copybs.com memdisk/memdisk ++ syslinux.com copybs.com memdisk/memdisk + # Things to install in /usr/lib + INSTALL_LIB = $(LIB_SO) libsyslinux.a + # Things to install in /usr/include diff --git a/packages/ia32/syslinux/syslinux b/packages/ia32/syslinux/syslinux new file mode 100644 index 0000000..297c61c --- /dev/null +++ b/packages/ia32/syslinux/syslinux @@ -0,0 +1,13 @@ +# hdw - linux syslinux package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.10 +# [S] 3-6 +# [D] syslinux-2.10.tar.bz2 http://kernel.org/pub/linux/utils/boot/syslinux/ + +post_install() { + rm -rf $docdir + mkdir -p $docdir + cp -v *.doc $docdir + } diff --git a/packages/multimedia/aalib/aalib b/packages/multimedia/aalib/aalib new file mode 100644 index 0000000..9458090 --- /dev/null +++ b/packages/multimedia/aalib/aalib @@ -0,0 +1,7 @@ +# hdw - linux aalib package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.4rc5 +# [S] 3-4 +# [D] aalib-1.4rc5.tar.gz http://cesnet.dl.sourceforge.net/sourceforge/aa-project/ diff --git a/packages/multimedia/audiofile/audiofile b/packages/multimedia/audiofile/audiofile new file mode 100644 index 0000000..02d7ad6 --- /dev/null +++ b/packages/multimedia/audiofile/audiofile @@ -0,0 +1,7 @@ +# hdw - linux audiofile package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.2.6 +# [S] 3-2 +# [D] audiofile-0.2.6.tar.gz http://www.68k.org/~michael/audiofile/ diff --git a/packages/multimedia/avifile/avifile b/packages/multimedia/avifile/avifile new file mode 100644 index 0000000..57d888d --- /dev/null +++ b/packages/multimedia/avifile/avifile @@ -0,0 +1,13 @@ +# hdw - linux avifile package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-5 +# [D] avifile.tar.bz2 cvs:anonymous:cvs.avifile.sourceforge.net:cvsroot/avifile:avifile + +pre_install() { + ./autogen.sh + } + +confopt="$confopt --enable-shared --enable-static" diff --git a/packages/multimedia/faad2/faad2 b/packages/multimedia/faad2/faad2 new file mode 100644 index 0000000..fe42c39 --- /dev/null +++ b/packages/multimedia/faad2/faad2 @@ -0,0 +1,11 @@ +# hdw - linux faad2 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.0 +# [S] 3-8 +# [D] faad2-2.0.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/faac/ + +pre_install() { + autoreconf -vif + } diff --git a/packages/multimedia/faad2/no_rpm_makefile.patch b/packages/multimedia/faad2/no_rpm_makefile.patch new file mode 100644 index 0000000..12377bc --- /dev/null +++ b/packages/multimedia/faad2/no_rpm_makefile.patch @@ -0,0 +1,11 @@ +--- ./Makefile.am.orig 2004-07-20 13:54:01.000000000 +0200 ++++ ./Makefile.am 2004-07-20 13:54:16.000000000 +0200 +@@ -1,8 +1,3 @@ + SUBDIRS = libfaad common frontend plugins + + EXTRA_DIST = faad2.spec +- +-rpm: Makefile +- make dist +- $(RPMBUILD) -ta $(PACKAGE)-$(VERSION).tar.gz +- rm $(PACKAGE)-$(VERSION).tar.gz diff --git a/packages/multimedia/ffmpeg/ffmpeg b/packages/multimedia/ffmpeg/ffmpeg new file mode 100644 index 0000000..3180854 --- /dev/null +++ b/packages/multimedia/ffmpeg/ffmpeg @@ -0,0 +1,19 @@ +# hdw - linux ffmpeg package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-8 +# [D] ffmpeg.tar.bz2 cvs:anonymous:mplayerhq.hu:cvsroot/ffmpeg:ffmpeg + +unset CFLAGS + +confopt="$confopt --enable-shared --enable-pp --enable-pthreads" +confopt="$confopt --enable-a52 --enable-faad --enable-xvid" +confopt="$confopt --enable-mp3lame --enable-vorbis --enable-gpl" +confopt="$confopt --extra-cflags=-I${root}/usr/X11/include" + +post_install() { + echo "installing libpostproc stuff ..." + make -C libavcodec/libpostproc install + } diff --git a/packages/multimedia/flite/flite b/packages/multimedia/flite/flite new file mode 100644 index 0000000..9a73d7a --- /dev/null +++ b/packages/multimedia/flite/flite @@ -0,0 +1,15 @@ +# hdw - linux flite package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2-release +# [S] 3-9 +# [D] flite-1.2-release.tar.bz2 http://www.speech.cs.cmu.edu/flite/packed/flite-1.2/ + +# let package decide itself! +unset CFLAGS + +post_install() { + rm -rf $docdir && mkdir $docdir + cp -r ./doc/[!M]* $docdir + } diff --git a/packages/multimedia/lame/lame b/packages/multimedia/lame/lame new file mode 100644 index 0000000..3c7052f --- /dev/null +++ b/packages/multimedia/lame/lame @@ -0,0 +1,7 @@ +# hdw - linux lame package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.96 +# [S] 3-7 +# [D] lame-3.96.tar.gz http://belnet.dl.sourceforge.net/sourceforge/lame/ diff --git a/packages/multimedia/liba52/liba52 b/packages/multimedia/liba52/liba52 new file mode 100644 index 0000000..5712e5a --- /dev/null +++ b/packages/multimedia/liba52/liba52 @@ -0,0 +1,13 @@ +# hdw - linux liba52 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-3 +# [D] liba52.tar.bz2 cvs:anonymous:cvs.liba52.sourceforge.net:cvsroot/liba52:a52dec + +srcdir="a52dec" + +pre_install() { + ./bootstrap + } diff --git a/packages/multimedia/libdivxdecore/libdivxdecore b/packages/multimedia/libdivxdecore/libdivxdecore new file mode 100644 index 0000000..ca5e3de --- /dev/null +++ b/packages/multimedia/libdivxdecore/libdivxdecore @@ -0,0 +1,7 @@ +# hdw - linux libdivxdecore package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.4.7 +# [S] 3-3 +# [D] libdivxdecore-0.4.7.tar.gz http://download2.projectmayo.com/dnload/divx4linux/xmps/ diff --git a/packages/multimedia/libdvbpsi/libdvbpsi b/packages/multimedia/libdvbpsi/libdvbpsi new file mode 100644 index 0000000..5167fcd --- /dev/null +++ b/packages/multimedia/libdvbpsi/libdvbpsi @@ -0,0 +1,7 @@ +# hdw - linux libdvdpsi package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.1.4 +# [S] 3-3 +# [D] libdvbpsi3-0.1.4.tar.bz2 http://www.videolan.org/pub/libdvbpsi/0.1.4/ diff --git a/packages/multimedia/libdvdcss/libdvdcss b/packages/multimedia/libdvdcss/libdvdcss new file mode 100644 index 0000000..4098939 --- /dev/null +++ b/packages/multimedia/libdvdcss/libdvdcss @@ -0,0 +1,7 @@ +# hdw - linux libdvdcss package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.8 +# [S] 3-3 +# [D] libdvdcss-1.2.8.tar.bz2 http://www.videolan.org/pub/videolan/libdvdcss/1.2.8/ diff --git a/packages/multimedia/libdvdplay/libdvdplay b/packages/multimedia/libdvdplay/libdvdplay new file mode 100644 index 0000000..b77c5d0 --- /dev/null +++ b/packages/multimedia/libdvdplay/libdvdplay @@ -0,0 +1,7 @@ +# hdw - linux libdvdplay package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.1 +# [S] 3-4 +# [D] libdvdplay-1.0.1.tar.bz2 http://www.videolan.org/pub/libdvdplay/1.0.1/ diff --git a/packages/multimedia/libdvdread/libdvdread b/packages/multimedia/libdvdread/libdvdread new file mode 100644 index 0000000..fb8d844 --- /dev/null +++ b/packages/multimedia/libdvdread/libdvdread @@ -0,0 +1,9 @@ +# hdw - linux libdvdread package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.9.4 +# [S] 3-3 +# [D] libdvdread-0.9.4.tar.gz http://www.dtek.chalmers.se/groups/dvd/dist/ + +confopt="$confopt --with-libdvdcss=$root/usr/lib" diff --git a/packages/multimedia/libflash/libflash b/packages/multimedia/libflash/libflash new file mode 100644 index 0000000..2861ba6 --- /dev/null +++ b/packages/multimedia/libflash/libflash @@ -0,0 +1,9 @@ +# hdw - linux libflash package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.4.10 +# [S] 3-4 +# [D] libflash-0.4.10.tar.gz http://directfb.org/download/contrib/ + +confopt="$confopt --enable-shared --enable-static" diff --git a/packages/multimedia/libflash/shape.patch b/packages/multimedia/libflash/shape.patch new file mode 100644 index 0000000..0ae3440 --- /dev/null +++ b/packages/multimedia/libflash/shape.patch @@ -0,0 +1,10 @@ +--- old/lib/shape.cc.orig Sun Aug 25 02:08:38 2002 ++++ new/lib/shape.cc Sun Aug 25 02:09:07 2002 +@@ -21,6 +21,7 @@ + // + + #include "swf.h" ++#include + + #ifdef RCSID + static char *rcsid = "$Id: shape.patch,v 1.1 2004-07-21 08:58:09 hackbard Exp $"; diff --git a/packages/multimedia/libjpeg/libjpeg b/packages/multimedia/libjpeg/libjpeg new file mode 100644 index 0000000..f480e35 --- /dev/null +++ b/packages/multimedia/libjpeg/libjpeg @@ -0,0 +1,10 @@ +# hdw - linux libjpeg package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] v6b +# [S] 3-3 +# [D] jpegsrc.v6b.tar.gz http://www.ijg.org/files/ + +srcdir="jpeg-`echo $ver | sed 's/v//'`" +confopt="$confopt --enable-shared --enable-static" diff --git a/packages/multimedia/libmad/libmad b/packages/multimedia/libmad/libmad new file mode 100644 index 0000000..8905719 --- /dev/null +++ b/packages/multimedia/libmad/libmad @@ -0,0 +1,7 @@ +# hdw - linux libmad package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.15.0b +# [S] 3-8 +# [D] libmad-0.15.0b.tar.gz http://www.videolan.org/pub/videolan/vlc/0.6.2/contrib/ diff --git a/packages/multimedia/libmpeg2/libmpeg2 b/packages/multimedia/libmpeg2/libmpeg2 new file mode 100644 index 0000000..759ca33 --- /dev/null +++ b/packages/multimedia/libmpeg2/libmpeg2 @@ -0,0 +1,13 @@ +# hdw - linux libmpeg2 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-3 +# [D] libmpeg2.tar.bz2 cvs:anonymous:cvs.libmpeg2.sourceforge.net:cvsroot/libmpeg2:mpeg2dec + +srcdir=mpeg2dec + +pre_install() { + ./bootstrap + } diff --git a/packages/multimedia/libmpeg3/libmpeg3 b/packages/multimedia/libmpeg3/libmpeg3 new file mode 100644 index 0000000..09ccf53 --- /dev/null +++ b/packages/multimedia/libmpeg3/libmpeg3 @@ -0,0 +1,14 @@ +# hdw - linux libmpeg3 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.5 +# [S] 3-3 +# [D] libmpeg3-1.5.tar.gz http://directfb.org/download/contrib/ + +post_install() { + # copy include files + cp *.h $prefix/include + cp *.inc $prefix/include + cp -r audio video $prefix/include + } diff --git a/packages/multimedia/libmpeg3/makefile.patch b/packages/multimedia/libmpeg3/makefile.patch new file mode 100644 index 0000000..7fb7f64 --- /dev/null +++ b/packages/multimedia/libmpeg3/makefile.patch @@ -0,0 +1,11 @@ +--- old/Makefile.orig Fri Aug 23 18:07:52 2002 ++++ new/Makefile Fri Aug 23 18:09:22 2002 +@@ -149,6 +149,8 @@ + + install: + cp $(UTILS) /usr/bin ++ cp $(OUTPUT) /usr/lib ++ cp $(SHAREDOUTPUT) /usr/lib + + clean: + rm -rf $(OBJDIR) diff --git a/packages/multimedia/libogg/libogg b/packages/multimedia/libogg/libogg new file mode 100644 index 0000000..33e17fb --- /dev/null +++ b/packages/multimedia/libogg/libogg @@ -0,0 +1,7 @@ +# hdw - linux libogg package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0 +# [S] 3-3 +# [D] libogg-1.0.tar.gz http://www.vorbis.com/files/1.0/unix/ diff --git a/packages/multimedia/libpdf/libpdf b/packages/multimedia/libpdf/libpdf new file mode 100644 index 0000000..31fcfc0 --- /dev/null +++ b/packages/multimedia/libpdf/libpdf @@ -0,0 +1,9 @@ +# hdw - linux libpdf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 6.0.0p1 +# [S] 3-3 +# [D] PDFlib-Lite-6.0.0p1.tar.gz http://www.pdflib.com/products/pdflib/download/600p1src/ + +srcdir="PDFlib-Lite-${ver}" diff --git a/packages/multimedia/libpng/libpng b/packages/multimedia/libpng/libpng new file mode 100644 index 0000000..5e33198 --- /dev/null +++ b/packages/multimedia/libpng/libpng @@ -0,0 +1,17 @@ +# hdw - linux libpng package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.5 +# [S] 3-3 +# [D] libpng-1.2.5.tar.bz2 http://unc.dl.sourceforge.net/sourceforge/libpng/ + +pre_install() { + cp -v scripts/makefile.linux Makefile + } +post_install() { + [ -f $prefix/include/libpng12/png.h ] && \ + ln -svf libpng12/png.h $prefix/include/png.h + [ -f $prefix/include/libpng12/pngconf.h ] && \ + ln -sfv libpng12/pngconf.h $prefix/include/pngconf.h + } diff --git a/packages/multimedia/libpng/makefile.linux.patch b/packages/multimedia/libpng/makefile.linux.patch new file mode 100644 index 0000000..66df703 --- /dev/null +++ b/packages/multimedia/libpng/makefile.linux.patch @@ -0,0 +1,19 @@ +--- old/scripts/makefile.linux.orig Wed Aug 21 20:30:34 2002 ++++ new/scripts/makefile.linux Wed Aug 21 20:34:25 2002 +@@ -13,13 +13,13 @@ + # where "make install" puts libpng12.a, libpng12.so*, + # libpng12/png.h and libpng12/pngconf.h + # Prefix must be a full pathname. +-prefix=/usr/local ++prefix=/usr + + # Where the zlib library and include files are located. + #ZLIBLIB=/usr/local/lib + #ZLIBINC=/usr/local/include +-ZLIBLIB=../zlib +-ZLIBINC=../zlib ++ZLIBLIB=/usr/lib ++ZLIBINC=/usr/include + + ALIGN= + # for i386: diff --git a/packages/multimedia/libtiff/libtiff b/packages/multimedia/libtiff/libtiff new file mode 100644 index 0000000..e04b723 --- /dev/null +++ b/packages/multimedia/libtiff/libtiff @@ -0,0 +1,10 @@ +# hdw - linux libtiff package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] v3.6.1 +# [S] 3-3 +# [D] tiff-v3.6.1.tar.gz ftp://ftp.remotesensing.org/pub/libtiff/ + +srcdir="tiff-$ver" +confopt="--prefix=$prefix --noninteractive" diff --git a/packages/multimedia/libtiff/manpages.patch b/packages/multimedia/libtiff/manpages.patch new file mode 100644 index 0000000..2af08c2 --- /dev/null +++ b/packages/multimedia/libtiff/manpages.patch @@ -0,0 +1,10 @@ +--- ./configure.orig 2004-07-17 12:45:17.000000000 +0200 ++++ ./configure 2004-07-17 12:44:25.000000000 +0200 +@@ -1386,6 +1386,7 @@ + if [ -z "${DIR_MAN-}" ]; then + MANPATH=" + $MANPATH ++ /usr/man + /usr/local/man + /usr/contrib/man + /usr/catman/local diff --git a/packages/multimedia/libungif/libungif b/packages/multimedia/libungif/libungif new file mode 100644 index 0000000..0b57603 --- /dev/null +++ b/packages/multimedia/libungif/libungif @@ -0,0 +1,11 @@ +# hdw - linux libungif package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.1.0 +# [S] 3-3 +# [D] libungif-4.1.0.tar.gz http://www.ibiblio.org/pub/Linux/libs/graphics/ + +post_install() { + ln -sfv libungif.so $root/usr/lib/libgif.so + } diff --git a/packages/multimedia/libvorbis/libvorbis b/packages/multimedia/libvorbis/libvorbis new file mode 100644 index 0000000..f4fc079 --- /dev/null +++ b/packages/multimedia/libvorbis/libvorbis @@ -0,0 +1,9 @@ +# hdw - linux libvorbis package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0 +# [S] 3-3 +# [D] libvorbis-1.0.tar.gz http://www.vorbis.com/files/1.0/unix/ + +confopt="$confopt --with-ogg=$prefix" diff --git a/packages/multimedia/mplayer/kernel_2_6.patch b/packages/multimedia/mplayer/kernel_2_6.patch new file mode 100644 index 0000000..6249fcb --- /dev/null +++ b/packages/multimedia/mplayer/kernel_2_6.patch @@ -0,0 +1,12 @@ +--- ./osdep/kerneltwosix.h.orig 2004-07-20 16:37:03.000000000 +0200 ++++ ./osdep/kerneltwosix.h 2004-07-20 16:39:26.000000000 +0200 +@@ -1,9 +1 @@ + #include +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,70) +-#define __KERNEL__ +-#include +-#include +-#undef __KERNEL__ +-#endif +- +- diff --git a/packages/multimedia/mplayer/mplayer b/packages/multimedia/mplayer/mplayer new file mode 100644 index 0000000..dce58b0 --- /dev/null +++ b/packages/multimedia/mplayer/mplayer @@ -0,0 +1,43 @@ +# hdw - linux mplayer package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-8 +# [D] mplayer.tar.bz2 cvs:anonymous:mplayerhq.hu:cvsroot/mplayer:main +# [D] ffmpeg.tar.bz2 cvs:anonymous:mplayerhq.hu:cvsroot/ffmpeg:ffmpeg +# [D] win32codecs-20040703.tar.bz2 ftp://mplayerhq.hu/MPlayer/releases/codecs/ +# [D] qt6dlls-20040626.tar.bz2 http://www.mplayerhq.hu/MPlayer/releases/codecs/ + +srcdir="main" + +confopt="--prefix=$prefix --confdir=$sysconfdir --language=en" +confopt="$confopt --enable-linux-devfs --enable-fbdev" +confopt="$confopt --enable-xinerama --enable-directfb" +confopt="$confopt --with-win32libdir=$prefix/lib/win32codecs" +#confopt_bug="--disable-freetype" # --disable-mpdvdkit" +confopt="$confopt $confopt_bug" + +pre_install() { + # prepeare libavcodec + tar --use-compress-program=bzip2 -xvf \ + $hdw_home_dir/download/multimedia/mplayer/ffmpeg.tar.bz2 + mkdir -p libavcodec + cp -a ffmpeg/libavcodec/* libavcodec && rm -rf ffmpeg + + # copy codecs.conf + cp ./etc/codecs.conf $root/etc/ + + # prepare win32 lib stuff + rm -rf $prefix/lib/win32codecs + mkdir -p $prefix/lib + tar --use-compress-program=bzip2 -xvf \ + $archdir/win32codecs-20040703.tar.bz2 \ + -C $prefix/lib + mv $prefix/lib/win32codecs-* $prefix/lib/win32codecs + tar --use-compress-program=bzip2 -xvf \ + $archdir/qt6dlls-20040626.tar.bz2 \ + -C $prefix/lib + mv $prefix/lib/qt6dlls-*/* $prefix/lib/win32codecs + rm -rf $prefix/lib/qt6dlls-* + } diff --git a/packages/multimedia/openmotif/no_animate_demo.patch b/packages/multimedia/openmotif/no_animate_demo.patch new file mode 100644 index 0000000..9e85ca2 --- /dev/null +++ b/packages/multimedia/openmotif/no_animate_demo.patch @@ -0,0 +1,10 @@ +--- ./demos/programs/Makefile.in.orig 2003-05-23 00:30:12.000000000 +0200 ++++ ./demos/programs/Makefile.in 2003-05-23 00:30:25.000000000 +0200 +@@ -90,7 +90,6 @@ + YACC = @YACC@ + + SUBDIRS = airport \ +- animate \ + drag_and_drop \ + draw \ + earth \ diff --git a/packages/multimedia/openmotif/openmotif b/packages/multimedia/openmotif/openmotif new file mode 100644 index 0000000..d286c70 --- /dev/null +++ b/packages/multimedia/openmotif/openmotif @@ -0,0 +1,9 @@ +# hdw - linux openmotif package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.2.2 +# [S] 3-4 +# [D] openMotif-2.2.2.tar.gz ftp://ftp.uk.linux.org/pub/linux/openmotif/2.2/src/ + +srcdir="openMotif-${ver}" diff --git a/packages/multimedia/sdl/sdl b/packages/multimedia/sdl/sdl new file mode 100644 index 0000000..f0c937e --- /dev/null +++ b/packages/multimedia/sdl/sdl @@ -0,0 +1,11 @@ +# hdw - linux sdl package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.7 +# [S] 3-4 +# [D] SDL-1.2.7.tar.gz http://www.libsdl.org/release/ + +srcdir="SDL-$ver" + +confopt="$confopt --enable-arts-shared --enable-dlopen" diff --git a/packages/multimedia/speex/speex b/packages/multimedia/speex/speex new file mode 100644 index 0000000..175600c --- /dev/null +++ b/packages/multimedia/speex/speex @@ -0,0 +1,7 @@ +# hdw - linux speex package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.1.5 +# [S] 3-4 +# [D] speex-1.1.5.tar.gz http://speex.org/download/ diff --git a/packages/multimedia/transcode/transcode b/packages/multimedia/transcode/transcode new file mode 100644 index 0000000..c09853d --- /dev/null +++ b/packages/multimedia/transcode/transcode @@ -0,0 +1,7 @@ +# hdw - linux transcode package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.6.12 +# [S] 3-8 +# [D] transcode-0.6.12.tar.bz2 http://zebra.fh-weingarten.de/~transcode/pre/ diff --git a/packages/multimedia/vlc/vlc b/packages/multimedia/vlc/vlc new file mode 100644 index 0000000..06482a4 --- /dev/null +++ b/packages/multimedia/vlc/vlc @@ -0,0 +1,8 @@ +# hdw - linux vlc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.7.2 +# [S] 3-8 +## [D] vlc.tar.bz2 cvs:anonymous:anoncvs.videolan.org:var/cvs/videolan:vlc +# [D] vlc-0.7.2.tar.gz http://download.videolan.org/pub/videolan/vlc/0.7.2/ diff --git a/packages/multimedia/vobcopy/vobcopy b/packages/multimedia/vobcopy/vobcopy new file mode 100644 index 0000000..8093ae2 --- /dev/null +++ b/packages/multimedia/vobcopy/vobcopy @@ -0,0 +1,18 @@ +# hdw - linux vobcopy package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.5.13 +# [S] 3-4 +# [D] vobcopy-0.5.13.tar.bz2 http://lpn.rnbhq.org/download/ + +confopt="--prefix=$prefix --bindir=$prefix/bin --mandir=$prefix/man" +confopt="$confopt --with-dvdread-libs=$root/usr --with-lfs" + +build_main() { + echo "configuring ..." + ./configure.sh $confopt && + echo "building ..." + make && + make install + } diff --git a/packages/multimedia/xawtv/xawtv b/packages/multimedia/xawtv/xawtv new file mode 100644 index 0000000..0508009 --- /dev/null +++ b/packages/multimedia/xawtv/xawtv @@ -0,0 +1,11 @@ +# hdw - linux xawtv package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.93 +# [S] 3-8 +# [D] xawtv-3.93.tar.gz http://dl.bytesex.org/releases/xawtv/ + +pre_install() { + export PATH="$PATH:$root/usr/X11R6/bin" + } diff --git a/packages/multimedia/xvid/xvid b/packages/multimedia/xvid/xvid new file mode 100644 index 0000000..fba907a --- /dev/null +++ b/packages/multimedia/xvid/xvid @@ -0,0 +1,19 @@ +# hdw - linux xvid package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-3 +# [D] xvid.tar.bz2 cvs:anonymous:cvs.xvid.org:xvid:xvidcore + +srcdir="xvidcore/build/generic" + +pre_install() { + ./bootstrap.sh + } + +post_install() { + for i in $root/usr/lib/libxvidcore.so.*; do + ln -sfv $i $root/usr/lib/libxvidcore.so + done + } diff --git a/packages/net/bind/bind b/packages/net/bind/bind new file mode 100644 index 0000000..1cae286 --- /dev/null +++ b/packages/net/bind/bind @@ -0,0 +1,9 @@ +# hdw - linux bind package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 9.3.0 +# [S] 3-2 +# [D] bind-9.3.0rc2.tar.gz ftp://ftp.isc.org/isc/bind9/9.3.0rc2/ + +confopt="$confopt --with-openssl --with-libtool" diff --git a/packages/net/bind/named.init b/packages/net/bind/named.init new file mode 100644 index 0000000..dfc25c4 --- /dev/null +++ b/packages/net/bind/named.init @@ -0,0 +1 @@ +s_value=45 diff --git a/packages/net/bridge-utils/bridge-utils b/packages/net/bridge-utils/bridge-utils new file mode 100644 index 0000000..6b12c8a --- /dev/null +++ b/packages/net/bridge-utils/bridge-utils @@ -0,0 +1,7 @@ +# hdw - linux bridge-utils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.4 +# [S] 3-1 +# [D] bridge-utils-1.0.4.tar.gz http://belnet.dl.sourceforge.net/sourceforge/bridge/ diff --git a/packages/net/dhcp/dhcp b/packages/net/dhcp/dhcp new file mode 100644 index 0000000..63b7242 --- /dev/null +++ b/packages/net/dhcp/dhcp @@ -0,0 +1,31 @@ +# hdw - linux dhcp package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.0.1 +# [S] 3-1 +# [D] dhcp-3.0.1.tar.gz ftp://ftp.isc.org/isc/dhcp/ + +pre_install() { + cat >> site.conf <<-EOF +USERBINDIR = $prefix/bin +BINDIR = $prefix/sbin +CLIENTBINDIR = $prefix/sbin +LIBDIR = $prefix/lib +INCDIR = $prefix/include +ETC = $sysconfdir +ADMMANDIR = $prefix/man/man8 +FFMANDIR = $prefix/man/man5 +EOF + } + +confopt="" + +post_install() { + # dhclient-script needs to get symlinked to /sbin + ln -sfv ../usr/sbin/dhclient-script $root/sbin/dhclient-script + + # documentation and config files + rm -rf $docdir && mkdir -p $docdir + cp -v doc/* client/dhclient.conf server/dhcpd.conf $docdir + } diff --git a/packages/net/dhcp/dhcp.init b/packages/net/dhcp/dhcp.init new file mode 100644 index 0000000..be98037 --- /dev/null +++ b/packages/net/dhcp/dhcp.init @@ -0,0 +1,4 @@ +bin=dhcpd +run=dhcpd +params="-q" +s_value=70 diff --git a/packages/net/ethereal/ethereal b/packages/net/ethereal/ethereal new file mode 100644 index 0000000..8b101e3 --- /dev/null +++ b/packages/net/ethereal/ethereal @@ -0,0 +1,16 @@ +# hdw - linux ethereal package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-9 +# [D] ethereal.tar.bz2 cvs:anoncvs:cvs.ethereal.com:cvsroot:ethereal + +pre_install() { + ./autogen.sh + } + +post_install() { + rm -rf $docdir ; mkdir -p $docdir + cp doc/R* doc/r* $docdir + } diff --git a/packages/net/ettercap/ettercap b/packages/net/ettercap/ettercap new file mode 100644 index 0000000..3bcb460 --- /dev/null +++ b/packages/net/ettercap/ettercap @@ -0,0 +1,7 @@ +# hdw - linux ettercap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] NG-0.7.0 +# [S] 3-8 +# [D] ettercap-NG-0.7.0.tar.gz http://belnet.dl.sourceforge.net/sourceforge/ettercap/ diff --git a/packages/net/ipsec-tools/ipsec-tools b/packages/net/ipsec-tools/ipsec-tools new file mode 100644 index 0000000..37d6ccd --- /dev/null +++ b/packages/net/ipsec-tools/ipsec-tools @@ -0,0 +1,18 @@ +# hdw-linux ipsec-tools extensions + +# author: hackbard + +# [S] 3-2 +# [V] 0.3.3 +# [D] ipsec-tools-0.3.3.tar.gz http://switch.dl.sourceforge.net/sourceforge/ipsec-tools/ + +CFLAGS="$CFLAGS -DEINTR=4 -DEINVAL=22 -DENOENT=2 -DENOBUFS=105" +CFLAGS="$CFLAGS -DEPROTONOSUPPORT=93 -DEAFNOSUPPORT=97" +export CFLAGS + +post_install() { + cat >> $root/etc/setkey.conf << EOF +flush; +spdflush; +EOF + } diff --git a/packages/net/iptables/iptables b/packages/net/iptables/iptables new file mode 100644 index 0000000..a4fe061 --- /dev/null +++ b/packages/net/iptables/iptables @@ -0,0 +1,10 @@ +# hdw - linux iptables package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.11 +# [S] 3-2 +# [D] iptables-1.2.11.tar.bz2 http://www.iptables.org/files/ + +make_conf="LIBDIR=$root/lib BINDIR=$root/sbin PREFIX=$prefix" +install_conf="$make_conf" diff --git a/packages/net/iptables/libip6tc.patch b/packages/net/iptables/libip6tc.patch new file mode 100644 index 0000000..b9b8580 --- /dev/null +++ b/packages/net/iptables/libip6tc.patch @@ -0,0 +1,11 @@ +--- ./include/libiptc/libip6tc.h.orig 2004-07-15 23:43:03.000000000 +0200 ++++ ./include/libiptc/libip6tc.h 2004-07-15 23:43:37.000000000 +0200 +@@ -2,6 +2,8 @@ + #define _LIBIP6TC_H + /* Library which manipulates firewall rules. Version 0.2. */ + ++#include ++ + #include + #include + diff --git a/packages/net/iptables/libiptc.patch b/packages/net/iptables/libiptc.patch new file mode 100644 index 0000000..ad52f7b --- /dev/null +++ b/packages/net/iptables/libiptc.patch @@ -0,0 +1,11 @@ +--- ./include/libiptc/libiptc.h.orig 2004-07-15 23:41:53.000000000 +0200 ++++ ./include/libiptc/libiptc.h 2004-07-15 23:42:21.000000000 +0200 +@@ -2,6 +2,8 @@ + #define _LIBIPTC_H + /* Library which manipulates filtering rules. */ + ++#include ++ + #include + #include + diff --git a/packages/net/libnet/libnet b/packages/net/libnet/libnet new file mode 100644 index 0000000..8b881b3 --- /dev/null +++ b/packages/net/libnet/libnet @@ -0,0 +1,11 @@ +# hdw - linux libnet package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.1.2.1 +# [S] 3-1 +# [D] libnet-1.1.2.1.tar.gz http://www.packetfactory.net/libnet/dist/ + +post_install() { + [ ! -f $prefix/bin/libnet-config ] && cp libnet-config $prefix/bin + } diff --git a/packages/net/libpcap/libpcap b/packages/net/libpcap/libpcap new file mode 100644 index 0000000..f5bf2a7 --- /dev/null +++ b/packages/net/libpcap/libpcap @@ -0,0 +1,7 @@ +# hdw - linux libpcap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.8.3 +# [S] 3-1 +# [D] libpcap-0.8.3.tar.gz http://www.tcpdump.org/release/ diff --git a/packages/net/netkit-ftp/netkit-ftp b/packages/net/netkit-ftp/netkit-ftp new file mode 100644 index 0000000..a0cd7e4 --- /dev/null +++ b/packages/net/netkit-ftp/netkit-ftp @@ -0,0 +1,9 @@ +# hdw-linux netkit-ftp extensions + +# author: hackbard + +# [S] 3-2 +# [V] 0.17 +# [D] netkit-ftp-0.17.tar.gz ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ + +confopt="--prefix=$root/usr" diff --git a/packages/net/netkit-rsh/netkit-rsh b/packages/net/netkit-rsh/netkit-rsh new file mode 100644 index 0000000..44b5621 --- /dev/null +++ b/packages/net/netkit-rsh/netkit-rsh @@ -0,0 +1,9 @@ +# hdw-linux netkit-rsh extensions + +# author: hackbard + +# [S] 3-2 +# [V] 0.17 +# [D] netkit-rsh-0.17.tar.gz ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ + +confopt="--prefix=$root/usr" diff --git a/packages/net/netkit-telnet/line-name.patch b/packages/net/netkit-telnet/line-name.patch new file mode 100644 index 0000000..bf75f06 --- /dev/null +++ b/packages/net/netkit-telnet/line-name.patch @@ -0,0 +1,33 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# ROCK Linux: rock-src/package/base/netkit-telnet/line-name.patch +# ROCK Linux is Copyright (C) 1998 - 2002 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +--- ./telnetd/utility.c~ Sun Dec 12 15:59:45 1999 ++++ ./telnetd/utility.c Sat Apr 8 11:04:09 2000 +@@ -467,11 +467,10 @@ + switch (*++cp) { + + case 't': +- slash = strrchr(line, '/'); +- if (slash == NULL) ++ if ( strncmp(line,"/dev/",5) ) + putstr(line); + else +- putstr(slash+1); ++ putstr(line+5); + break; + + case 'h': diff --git a/packages/net/netkit-telnet/netkit-telnet b/packages/net/netkit-telnet/netkit-telnet new file mode 100644 index 0000000..75942bb --- /dev/null +++ b/packages/net/netkit-telnet/netkit-telnet @@ -0,0 +1,9 @@ +# hdw-linux netkit-telnet extensions + +# author: hackbard + +# [S] 3-2 +# [V] 0.17 +# [D] netkit-telnet-0.17.tar.gz ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ + +confopt="--prefix=$root/usr" diff --git a/packages/net/netkit-telnet/prototypes.patch b/packages/net/netkit-telnet/prototypes.patch new file mode 100644 index 0000000..c1120b0 --- /dev/null +++ b/packages/net/netkit-telnet/prototypes.patch @@ -0,0 +1,88 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# ROCK Linux: rock-src/package/base/netkit-telnet/prototypes.patch +# ROCK Linux is Copyright (C) 1998 - 2002 Clifford Wolf +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. A copy of the GNU General Public +# License can be found at Documentation/COPYING. +# +# Many people helped and are helping developing ROCK Linux. Please +# have a look at http://www.rocklinux.org/ and the Documentation/TEAM +# file for details. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +--- ./telnet/telnet.cc.orig Fri Sep 24 08:29:33 1999 ++++ ./telnet/telnet.cc Fri Sep 24 08:38:06 1999 +@@ -61,6 +61,9 @@ + * Due to lossage in some linux distributions/kernel releases/libc versions + * this must come *after* termios.h (which is included in externs.h) + */ ++ ++extern "C" { extern int tgetent(char *, const char *); } ++ + #include + + #ifdef USE_NCURSES +--- ./telnet/main.cc.orig Thu May 2 11:37:25 2002 ++++ ./telnet/main.cc Thu May 2 11:39:09 2002 +@@ -52,6 +52,8 @@ + #include "defines.h" + #include "proto.h" + ++extern "C" { extern void exit(int); } ++ + /* + * Initialize variables. + */ +--- ./telnet/network.cc.orig Thu May 2 11:39:50 2002 ++++ ./telnet/network.cc Thu May 2 11:40:00 2002 +@@ -49,6 +49,8 @@ + #include "proto.h" + #include "netlink.h" + ++extern "C" { extern void exit(int); } ++ + ringbuf netoring; + ringbuf netiring; + +--- ./telnet/terminal.cc.orig Thu May 2 11:40:16 2002 ++++ ./telnet/terminal.cc Thu May 2 11:40:58 2002 +@@ -53,6 +53,9 @@ + #include "proto.h" + #include "terminal.h" + ++extern "C" { extern void exit(int); } ++extern "C" { extern void *memcpy(void *, const void *, size_t); } ++ + static int TerminalWrite(const char *buf, int n); + static int TerminalRead(char *buf, int n); + +--- ./telnet/utilities.cc.orig Thu May 2 11:41:28 2002 ++++ ./telnet/utilities.cc Thu May 2 11:43:26 2002 +@@ -54,6 +54,11 @@ + #include "proto.h" + #include "terminal.h" + ++extern "C" { extern void exit(int); } ++extern "C" { extern size_t strlen(const char *); } ++extern "C" { extern char *strcmp(const char *, const char *); } ++extern "C" { extern char *strcpy(char *, const char *); } ++ + FILE *NetTrace = 0; /* Not in bss, since needs to stay */ /* ? */ + char NetTraceFile[256] = "(standard output)"; + +--- ./telnet/netlink.cc.orig Thu May 2 11:43:59 2002 ++++ ./telnet/netlink.cc Thu May 2 11:44:04 2002 +@@ -12,6 +12,8 @@ + #include "proto.h" + #include "ring.h" + ++extern "C" { extern void *memcpy(void *, const void *, size_t); } ++ + /* In Linux, this is an enum */ + #if defined(__linux__) || defined(IPPROTO_IP) + #define HAS_IPPROTO_IP diff --git a/packages/net/netkit-tftp/netkit-tftp b/packages/net/netkit-tftp/netkit-tftp new file mode 100644 index 0000000..53e1730 --- /dev/null +++ b/packages/net/netkit-tftp/netkit-tftp @@ -0,0 +1,9 @@ +# hdw-linux netkit-tftp extensions + +# author: hackbard + +# [S] 3-2 +# [V] 0.17 +# [D] netkit-tftp-0.17.tar.gz ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ + +confopt="--prefix=$root/usr" diff --git a/packages/net/nfs-utils/nfs-utils b/packages/net/nfs-utils/nfs-utils new file mode 100644 index 0000000..ef0f00b --- /dev/null +++ b/packages/net/nfs-utils/nfs-utils @@ -0,0 +1,45 @@ +# hdw-linux nfs-utils extensions + +# author: hackbard + +# [S] 3-2 +# [V] 1.0.6 +# [D] nfs-utils-1.0.6.tar.gz http://belnet.dl.sourceforge.net/sourceforge/nfs/ + + +post_install() { + # init scripts + cat > $root/etc/init.d/nfsd << 'EOF' +#!/bin/sh +# +# hdw - linux /etc/init.d/nfsd +# + +# remove for automatic startup +exit 0 + +[ ! -f /usr/sbin/portmap ] && exit 0 + +case "$1" in + start) echo "starting nfsd." + insmod -q nfsd > /dev/null 2>&1 + rpc.rquotad + rpc.mountd + rpc.nfsd 8 + exportfs -a ;; + stop) echo "stopping knfsd." + killall -15 rpc.mountd + killall -15 rpc.nfsd + killall -15 rpc.rquotad + killall -9 nfsd + exportfs -u -a ;; + *) echo "usage: $0 [start|stop]" + exit 0 ;; +esac +exit 0 +EOF + # permissions & link + chmod 750 $root/etc/init.d/nfsd + ln -sf ../nfsd $root/etc/init.d/rc2.d/S50nfsd + ln -sf ../nfsd $root/etc/init.d/rc2.d/K50nfsd + } diff --git a/packages/net/ngrep/bpf.patch b/packages/net/ngrep/bpf.patch new file mode 100644 index 0000000..80ff73d --- /dev/null +++ b/packages/net/ngrep/bpf.patch @@ -0,0 +1,58 @@ +--- ./configure.orig 2004-07-15 23:56:41.000000000 +0200 ++++ ./configure 2004-07-16 00:04:15.000000000 +0200 +@@ -2837,7 +2837,7 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-#include ++#include + #ifdef DLT_LINUX_SLL + yes + #endif +@@ -2863,7 +2863,7 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-#include ++#include + #ifdef DLT_LOOP + yes + #endif +@@ -2890,7 +2890,7 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-#include ++#include + #ifdef DLT_IEEE802_11 + yes + #endif +@@ -2917,7 +2917,7 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-#include ++#include + #ifdef DLT_RAW + yes + #endif +@@ -3273,7 +3273,7 @@ + pcap_dir="" + for dir in $PCAP_DIR ; do + if test -d $dir -a -r "$dir/pcap.h" -a \ +- -r "$dir/net/bpf.h" ; then ++ -r "$dir/pcap-bpf.h" ; then + if test -n "$pcap_dir" -a "$pcap_dir" != "$dir"; then + echo + echo; echo more than one set found in: +--- ./ngrep.c.orig 2004-07-16 00:07:46.000000000 +0200 ++++ ./ngrep.c 2004-07-16 00:08:06.000000000 +0200 +@@ -55,7 +55,7 @@ + #include + + #include +-#include ++#include + + #include + #include diff --git a/packages/net/ngrep/ngrep b/packages/net/ngrep/ngrep new file mode 100644 index 0000000..2af11dd --- /dev/null +++ b/packages/net/ngrep/ngrep @@ -0,0 +1,7 @@ +# hdw - linux ngrep package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.42 +# [S] 3-2 +# [D] ngrep-1.42.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/ngrep/ diff --git a/packages/net/nmap/nmap b/packages/net/nmap/nmap new file mode 100644 index 0000000..f06af07 --- /dev/null +++ b/packages/net/nmap/nmap @@ -0,0 +1,7 @@ +# hdw - linux nmap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.55 +# [S] 3-9 +# [D] nmap-3.55.tar.bz2 http://download.insecure.org/nmap/dist/ diff --git a/packages/net/openh323/openh323 b/packages/net/openh323/openh323 new file mode 100644 index 0000000..f3ece31 --- /dev/null +++ b/packages/net/openh323/openh323 @@ -0,0 +1,33 @@ +# hdw - linux openh323 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.12.2 +# [S] 3-2 +# [D] openh323_1.12.2.tar.gz http://www.openh323.org/bin/ + +xtra_ver="1.5.2" + +make_conf="optshared" + +pre_install() { + # do we build? + if [ ! -f $archdir/../pwlib/pwlib_${xtra_ver}.tar.gz ]; \ + then + echo "you will need pwlib source for openh323" + exit 1 + fi + # extract pwlib and set PWLIBDIR + echo "extracting pwlib source ..." + tar --use-compress-program=gunzip -xvf \ + $archdir/../pwlib/pwlib_${xtra_ver}.tar.gz -C ../ + cd ../pwlib* + # configure pwlib + ./configure $confopt + PWLIBDIR=`pwd` + export PWLIBDIR + cd - + export OPENH323DIR=`pwd` + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/lib" + ldconfig + } diff --git a/packages/net/portmap/makefile.patch b/packages/net/portmap/makefile.patch new file mode 100644 index 0000000..eceafa9 --- /dev/null +++ b/packages/net/portmap/makefile.patch @@ -0,0 +1,34 @@ +--- ./Makefile.orig 2003-10-27 01:49:12.000000000 +0100 ++++ ./Makefile 2003-10-27 01:55:58.000000000 +0100 +@@ -8,7 +8,7 @@ + # if you disagree. See `man 3 syslog' for examples. Some syslog versions + # do not provide this flexibility. + # +-FACILITY=LOG_MAIL ++FACILITY=LOG_AUTH + + # To disable host access control, comment out the following macro definition. + # Note: host access control requires the strtok() and strchr() routines. +@@ -36,7 +36,7 @@ + # With verbose logging on, HP-UX 9.x and AIX 4.1 leave zombies behind when + # SIGCHLD is not ignored. Enable next macro for a fix. + # +-# ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x ++ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x + + # Uncomment the following macro if your system does not have u_long. + # +@@ -46,11 +46,11 @@ + # libwrap.a object library. WRAP_DIR should specify the directory with + # that library. + +-WRAP_DIR= ../tcp_wrappers ++WRAP_DIR= /usr/lib + + # Auxiliary object files that may be missing from your C library. + # +-AUX = daemon.o strerror.o ++AUX = daemon.o + + # NEXTSTEP is a little different. The following seems to work with NS 3.2 + # diff --git a/packages/net/portmap/portmap b/packages/net/portmap/portmap new file mode 100644 index 0000000..53ea725 --- /dev/null +++ b/packages/net/portmap/portmap @@ -0,0 +1,23 @@ +# hdw-linux portmap extensions + +# author: hackbard + +# [S] 3-2 +# [V] 4 +# [D] portmap_4.tar.gz ftp://ftp.porcupine.org/pub/security/ + + +make_conf="$make_conf FACILITY=LOG_AUTH" +make_conf="$make_conf ZOMBIES=-DIGNORE_SIGCHLD WRAP_DIR=/usr/lib" + +build_main() { + echo "patching portmap.c ..." + sed 's/const\ char\ \*what/__const\ char\ \*what/' portmap.c > \ + portmap.c~ && + mv portmap.c~ portmap.c + echo "running: make $make_conf" + make $make_conf && + install -m 755 -s pmap_dump $prefix/sbin + install -m 755 -s pmap_set $prefix/sbin + install -m 755 -s portmap $prefix/sbin + } diff --git a/packages/net/portmap/portmap.init b/packages/net/portmap/portmap.init new file mode 100644 index 0000000..a6db5d5 --- /dev/null +++ b/packages/net/portmap/portmap.init @@ -0,0 +1,2 @@ +s_value=45 +depends=ifconfig diff --git a/packages/net/portmap/portmap_c.patch b/packages/net/portmap/portmap_c.patch new file mode 100644 index 0000000..c143414 --- /dev/null +++ b/packages/net/portmap/portmap_c.patch @@ -0,0 +1,18 @@ +--- ./portmap.c.orig 2003-10-27 01:57:13.000000000 +0100 ++++ ./portmap.c 2003-10-27 01:58:21.000000000 +0100 +@@ -85,6 +85,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -124,7 +125,6 @@ + static void callit(); + struct pmaplist *pmaplist; + int debugging = 0; +-extern int errno; + + #include "pmap_check.h" + diff --git a/packages/net/ppp/ppp b/packages/net/ppp/ppp new file mode 100644 index 0000000..f6821c3 --- /dev/null +++ b/packages/net/ppp/ppp @@ -0,0 +1,7 @@ +# hdw - linux ppp package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.4.1 +# [S] 3-2 +# [D] ppp-2.4.1.tar.gz ftp://cs.anu.edu.au/pub/software/ppp/ diff --git a/packages/net/pwlib/pwlib b/packages/net/pwlib/pwlib new file mode 100644 index 0000000..1a04b81 --- /dev/null +++ b/packages/net/pwlib/pwlib @@ -0,0 +1,15 @@ +# hdw - linux pwlib package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.5.2 +# [S] 3-1 +# [D] pwlib_1.5.2.tar.gz http://www.openh323.org/bin/ + +make_conf="optshared" + +pre_install() { + export PWLIBDIR=`pwd` + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/lib" + ldconfig + } diff --git a/packages/net/rarpd/libnet.patch b/packages/net/rarpd/libnet.patch new file mode 100644 index 0000000..f70edae --- /dev/null +++ b/packages/net/rarpd/libnet.patch @@ -0,0 +1,10 @@ +--- ./Makefile.in.orig 2004-07-14 17:24:39.000000000 +0200 ++++ ./Makefile.in 2004-07-14 17:30:31.000000000 +0200 +@@ -1,6 +1,6 @@ + INSTALL = @srcdir@/install.sh + CC = @CC@ +-CFLAGS = @CFLAGS@ @DEFS@ ++CFLAGS = @CFLAGS@ @DEFS@ -DNEW_LIBNET_INTERFACE + ENSUREDIR = @srcdir@/ensure-dir.sh + SBINDIR = @sbindir@ + diff --git a/packages/net/rarpd/rarpd b/packages/net/rarpd/rarpd new file mode 100644 index 0000000..22ce26a --- /dev/null +++ b/packages/net/rarpd/rarpd @@ -0,0 +1,10 @@ +# hdw - linux rarpd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.1 +# [S] 3-1 +# [D] rarpd-1.1.tar.gz ftp://ftp.dementia.org/pub/net-tools/ + +confopt="$confopt --with-pcap-lib=/usr/lib --with-pcap-include=/usr/include" +confopt="$confopt --with-libnet=/usr" diff --git a/packages/net/rp-pppoe/rp-pppoe b/packages/net/rp-pppoe/rp-pppoe new file mode 100644 index 0000000..eb23e68 --- /dev/null +++ b/packages/net/rp-pppoe/rp-pppoe @@ -0,0 +1,9 @@ +# hdw - linux rp-pppoe package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.5 +# [S] 3-2 +# [D] rp-pppoe-3.5.tar.gz http://www.roaringpenguin.com/penguin/pppoe/ + +srcdir="rp-pppoe-$ver/src" diff --git a/packages/net/rp-pppoe/rp-pppoe.init b/packages/net/rp-pppoe/rp-pppoe.init new file mode 100644 index 0000000..c8bc0e0 --- /dev/null +++ b/packages/net/rp-pppoe/rp-pppoe.init @@ -0,0 +1,2 @@ +bin=adsl-start +s_value=35 diff --git a/packages/net/samba/nmbd.init b/packages/net/samba/nmbd.init new file mode 100644 index 0000000..4fbaebf --- /dev/null +++ b/packages/net/samba/nmbd.init @@ -0,0 +1,4 @@ +s_value=50 +bin=nmbd +run=nmbd +params="-D" diff --git a/packages/net/samba/samba b/packages/net/samba/samba new file mode 100644 index 0000000..4ed5ea6 --- /dev/null +++ b/packages/net/samba/samba @@ -0,0 +1,12 @@ +# hdw - linux samba package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.0.4 +# [S] 4-10 +# [D] samba-3.0.4.tar.gz http://us3.samba.org/samba/ftp/ + +# samba in opt makes me sleep() better ... +prefix="$root/opt/samba" +srcdir="samba-$ver/source" +confopt="$confopt --with-smbmount" diff --git a/packages/net/samba/smbd.init b/packages/net/samba/smbd.init new file mode 100644 index 0000000..9c208be --- /dev/null +++ b/packages/net/samba/smbd.init @@ -0,0 +1,4 @@ +s_value=50 +bin=smbd +run=smbd +params="-D" diff --git a/packages/net/tcpdump/no_pcap_debug.patch b/packages/net/tcpdump/no_pcap_debug.patch new file mode 100644 index 0000000..016d9b1 --- /dev/null +++ b/packages/net/tcpdump/no_pcap_debug.patch @@ -0,0 +1,25 @@ +--- ./tcpdump.c.orig 2004-07-15 03:29:29.000000000 +0200 ++++ ./tcpdump.c 2004-07-15 03:31:55.000000000 +0200 +@@ -600,13 +600,15 @@ + case 'Y': + { + /* Undocumented flag */ +-#ifdef HAVE_PCAP_DEBUG +- extern int pcap_debug; +- pcap_debug = 1; +-#else +- extern int yydebug; +- yydebug = 1; +-#endif ++/* for some reason configure thinks we have pcap_debug which is not the case */ ++//#ifdef HAVE_PCAP_DEBUG ++// extern int pcap_debug; ++// pcap_debug = 1; ++//#else ++// extern int yydebug; ++// yydebug = 1; ++//#endif ++ printf("sorry, pcap_debug/yydebug not available\n"); + } + break; + #endif diff --git a/packages/net/tcpdump/tcpdump b/packages/net/tcpdump/tcpdump new file mode 100644 index 0000000..e9f3b67 --- /dev/null +++ b/packages/net/tcpdump/tcpdump @@ -0,0 +1,7 @@ +# hdw - linux tcpdump package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.8.3 +# [S] 3-1 +# [D] tcpdump-3.8.3.tar.gz http://www.tcpdump.org/release/ diff --git a/packages/net/tftp-hpa/tftp-hpa b/packages/net/tftp-hpa/tftp-hpa new file mode 100644 index 0000000..e29796e --- /dev/null +++ b/packages/net/tftp-hpa/tftp-hpa @@ -0,0 +1,7 @@ +# hdw-linux tftp-hpa extensions + +# author: hackbard + +# [S] 3-2 +# [V] 0.36 +# [D] tftp-hpa-0.36.tar.bz2 ftp://www.kernel.org/pub/software/network/tftp/ diff --git a/packages/net/vpnc/vpnc b/packages/net/vpnc/vpnc new file mode 100644 index 0000000..57c8341 --- /dev/null +++ b/packages/net/vpnc/vpnc @@ -0,0 +1,24 @@ +# hdw-linux vpnc package + +# author: hackbard + +# [S] 3-4 +# [V] 0.2-rm+zomb.1 +# [D] vpnc-0.2-rm+zomb.1.tar.gz http://www.unix-ag.uni-kl.de/~massar/vpnc/ + +build_main() { + [ -f ./configure ] && ./configure $confopt + make $make_conf + } + +post_install() { + mkdir -p $prefix/bin + install -m 755 vpnc $prefix/bin/vpnc + install -m 755 vpnc-connect $prefix/bin/vpnc-connect + install -m 755 vpnc-disconnect $prefix/bin/vpnc-disconnect + install -m 644 vpnc.8 $prefix/man/man8/vpnc.8 + mkdir -p $root/etc/vpnc + install -m 700 vpnc.conf $root/etc/vpnc/vpnc.conf + rm -rf $docdir && mkdir $docdir + cp README $docdir + } diff --git a/packages/net/wireless_tools/wireless_tools b/packages/net/wireless_tools/wireless_tools new file mode 100644 index 0000000..5ce3920 --- /dev/null +++ b/packages/net/wireless_tools/wireless_tools @@ -0,0 +1,21 @@ +# hdw - linux wireless_tools package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 26 +# [S] 3-2 +# [D] wireless_tools.26.tar.gz http://pcmcia-cs.sourceforge.net/ftp/contrib/ + +build_main() { + mkdir -p $prefix/bin ; mkdir -p $prefix/man/man8 + mkdir -p $prefix/{lib,include} ; rm -rf $docdir ; mkdir -p $docdir + # build + make + # install + cp iwconfig iwevent iwgetid iwlist iwspy iwpriv $prefix/bin + cp *.8 $prefix/man/man8 + cp libiw.so.$ver $prefix/lib + cp wireless*.h $prefix/include + cp README PCMCIA.txt INSTALL $docdir + } + diff --git a/packages/optional/nut/nut b/packages/optional/nut/nut new file mode 100644 index 0000000..2f9302c --- /dev/null +++ b/packages/optional/nut/nut @@ -0,0 +1,30 @@ +# hdw - linux nut package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.4.0 +# [S] 4-5 +# [D] nut-1.4.0.tar.gz http://penguin.harrison.k12.co.us/mirrors/nut/release/1.4/ + +confopt="$confopt --with-user=ups" +flist_pruned="${flist_pruned}|etc/shadow|etc/passwd|etc/group" + +pre_install() { + groupadd -g 1075 ups || true + useradd -c 'ups monitoring tools' -g ups -u 1075 ups \ + -d $root/var/state/ups -s /bin/false || true + mkdir -p $root/var/state/ups + chown ups.ups $root/var/state/ups + } + +post_install() { + mv $root/etc/upsd.conf.sample $root/etc/upsd.conf + mv $root/etc/upsd.users.sample $root/etc/upsd.users + mv $root/etc/upssched.conf.sample $root/etc/upssched.conf + mv $root/etc/ups.conf.sample $root/etc/ups.conf + mv $root/etc/upsmon.conf.sample $root/etc/upsmon.conf + chown ups.ups $root/etc/ups{,d,sched,mon}.conf + chown ups.ups $root/etc/upsd.users + chmod 0400 $root/etc/ups{,d,sched,mon}.conf + chmod 0400 $root/etc/upsd.users + } diff --git a/packages/optional/unrealircd/unrealircd b/packages/optional/unrealircd/unrealircd new file mode 100644 index 0000000..7a4b3e0 --- /dev/null +++ b/packages/optional/unrealircd/unrealircd @@ -0,0 +1,20 @@ +# hdw - linux unrealircd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.2.1 +# [S] 3-11 +# [D] Unreal3.2.1.tar.gz http://codercrew.org/unrealircd/ + +# we always install ircd to /opt ! +prefix="$root/opt/unrealircd" +srcdir="Unreal${ver}" +confopt="--prefix=$prefix --sysconfdir=$root/etc/opt/unrealircd" +confopt="$confopt --localstatedir=$root/var/opt/unrealircd" +confopt="$confopt --oldincludedir=$prefix/include" +# ircd settings +confopt="$confopt --enable-nospoof --enable-hub" # --enable-ssl" +confopt="$confopt --enable-dynamic-linking" +confopt="$confopt --with-dpath=$root/etc/opt/unrealircd" +confopt="$confopt --with-spath=$prefix/bin" +# more settings optional, see ./configure --help diff --git a/packages/optional/unrealircd/unrealircd.setup b/packages/optional/unrealircd/unrealircd.setup new file mode 100644 index 0000000..6553aba --- /dev/null +++ b/packages/optional/unrealircd/unrealircd.setup @@ -0,0 +1,14 @@ +setup_block() { + groupadd -g 1025 irc || true + useradd -c 'IRC-Server' -g irc -d $prefix -s /bin/false \ + -u 1025 unreal || true + echo "added irc user and group" + chown -R unreal.irc /opt/unrealircd + chmod +s /opt/unrealircd/bin/ircd + } + +uninstall_block() { + groupdel irc || true + userdel unreal || true + echo "removed irc user and group" + } diff --git a/packages/science/gnuplot/gnuplot b/packages/science/gnuplot/gnuplot new file mode 100644 index 0000000..a924ce7 --- /dev/null +++ b/packages/science/gnuplot/gnuplot @@ -0,0 +1,21 @@ +# hdw - linux gnuplot package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 4.0.0 +# [S] 3-6 +# [D] gnuplot-4.0.0.tar.gz ftp://ftp.ucc.ie/pub/gnuplot/ + +flist_pruned="$flist_pruned|usr/include/libpng12/pngconf.h" +confopt="$confopt --without-gd" + +pre_install() { + # ugly hack - modify pngconf.h + cp $prefix/include/libpng12/pngconf.h orig~ + sed 's%__png.h__%// __png.h__%' orig~ > tmp~ + sed 's%__dont__%// __dont__%' tmp~ > $prefix/include/libpng12/pngconf.h + } + +post_install() { + cp orig~ $prefix/include/libpng12/pngconf.h + } diff --git a/packages/science/gnuplot/pdflib.patch b/packages/science/gnuplot/pdflib.patch new file mode 100644 index 0000000..aef822f --- /dev/null +++ b/packages/science/gnuplot/pdflib.patch @@ -0,0 +1,11 @@ +--- ./term/pdf.trm.orig 2004-07-19 17:42:40.000000000 +0200 ++++ ./term/pdf.trm 2004-07-19 17:50:50.000000000 +0200 +@@ -343,7 +343,7 @@ + myPDF = PDF_new(); + + /*open new PDF file */ +- if (PDF_open_fp(myPDF, gpoutfile) == -1) ++ if (PDF_open_file(myPDF, gpoutfile) == -1) + int_error(NO_CARET, "Error:cannot open PDF file .\n"); + + #ifdef PDF_DONT_COMPRESS diff --git a/packages/science/grace/grace b/packages/science/grace/grace new file mode 100644 index 0000000..9101ea3 --- /dev/null +++ b/packages/science/grace/grace @@ -0,0 +1,10 @@ +# hdw - linux grace package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 5.1.16 +# [S] 3-6 +# [D] grace-5.1.16.tar.gz ftp://plasma-gate.weizmann.ac.il/pub/grace/src/ + +# install to /opt/grace +confopt="--prefix=$root/opt" diff --git a/packages/security/checkpwd/checkpwd b/packages/security/checkpwd/checkpwd new file mode 100644 index 0000000..95101a5 --- /dev/null +++ b/packages/security/checkpwd/checkpwd @@ -0,0 +1,10 @@ +# hdw - linux checkpwd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.90 +# [S] 3-3 +# [D] checkpassword-0.90.tar.gz http://cr.yp.to/checkpwd/ + +srcdir="checkpassword-$ver" +install_conf="$install_conf setup check" diff --git a/packages/security/checkpwd/include_errno_h.patch b/packages/security/checkpwd/include_errno_h.patch new file mode 100644 index 0000000..a73b921 --- /dev/null +++ b/packages/security/checkpwd/include_errno_h.patch @@ -0,0 +1,12 @@ +--- ./error.h.orig 2003-10-27 17:12:16.000000000 +0100 ++++ ./error.h 2003-10-27 17:12:47.000000000 +0100 +@@ -1,7 +1,8 @@ + #ifndef ERROR_H + #define ERROR_H + +-extern int errno; ++#include ++/* extern int errno; */ + + extern int error_intr; + extern int error_nomem; diff --git a/packages/security/checkpwd/makefile.patch b/packages/security/checkpwd/makefile.patch new file mode 100644 index 0000000..d0203dc --- /dev/null +++ b/packages/security/checkpwd/makefile.patch @@ -0,0 +1,29 @@ +--- ./Makefile.orig 2003-10-27 17:10:15.000000000 +0100 ++++ ./Makefile 2003-10-27 17:11:42.000000000 +0100 +@@ -22,7 +22,7 @@ + + auto_home.c: \ + auto-str conf-home +- ./auto-str auto_home `head -1 conf-home` > auto_home.c ++ ./auto-str auto_home `head -n 1 conf-home` > auto_home.c + + auto_home.o: \ + compile auto_home.c +@@ -91,7 +91,7 @@ + choose: \ + warn-auto.sh choose.sh conf-home + cat warn-auto.sh choose.sh \ +- | sed s}HOME}"`head -1 conf-home`"}g \ ++ | sed s}HOME}"`head -n 1 conf-home`"}g \ + > choose + chmod 755 choose + +@@ -166,7 +166,7 @@ + warn-auto.sh conf-ld + ( cat warn-auto.sh; \ + echo 'main="$$1"; shift'; \ +- echo exec "`head -1 conf-ld`" \ ++ echo exec "`head -n 1 conf-ld`" \ + '-o "$$main" "$$main".o $${1+"$$@"}' \ + ) > load + chmod 755 load diff --git a/packages/security/libgcrypt/libgcrypt b/packages/security/libgcrypt/libgcrypt new file mode 100644 index 0000000..67a634b --- /dev/null +++ b/packages/security/libgcrypt/libgcrypt @@ -0,0 +1,7 @@ +# hdw-linux libgcrypt package + +# author: hackbard + +# [S] 3-3 +# [V] 1.2.0 +# [D] libgcrypt-1.2.0.tar.gz ftp://ftp.gnupg.org/GnuPG/libgcrypt/ diff --git a/packages/security/libgpg-error/libgpg-error b/packages/security/libgpg-error/libgpg-error new file mode 100644 index 0000000..772feb8 --- /dev/null +++ b/packages/security/libgpg-error/libgpg-error @@ -0,0 +1,7 @@ +# hdw-linux libgpg-error package + +# author: hackbard + +# [S] 3-2 +# [V] 0.7 +# [D] libgpg-error-0.7.tar.gz ftp://ftp.gnupg.org/GnuPG/alpha/libgpg-error/ diff --git a/packages/security/openssh/openssh b/packages/security/openssh/openssh new file mode 100644 index 0000000..bee0458 --- /dev/null +++ b/packages/security/openssh/openssh @@ -0,0 +1,33 @@ +# hdw-linux ssh extensions + +# author: hackbard + +# [S] 3-2 +# [V] 3.8p1 +# [D] openssh-3.8p1.tar.gz ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ + +flist_pruned="${flist_pruned}|etc/shadow|etc/passwd|etc/group" + +pre_install() { + export LD=gcc + # add the sshd user + echo "adding user sshd ..." + [ -z "`cat $root/etc/passwd | grep sshd`" ] && useradd sshd + echo "done." + } + +confopt="$confopt --with-md5-passwords --without-pam --with-tcp-wrappers \ + --disable-suid-ssh --with-xauth=/usr/X11R6/bin/xauth \ + --sysconfdir=$root/etc/ssh" + +install_conf="$install_conf install-nokeys" + +post_install() { + # ssh host key + echo "creating ssh host keys ..." + [ ! -f $root/etc/ssh_host_dsa_key ] && \ + $root/usr/bin/ssh-keygen -d -b 1024 -f $root//etc/ssh_host_dsa_key -N "" + [ ! -f $root/etc/ssh_host_key ] && \ + $root/usr/bin/ssh-keygen -d -b 1024 -f $root/etc/ssh_host_key -N "" + echo "done. " + } diff --git a/packages/security/openssh/openssh.init b/packages/security/openssh/openssh.init new file mode 100644 index 0000000..ad10098 --- /dev/null +++ b/packages/security/openssh/openssh.init @@ -0,0 +1,4 @@ +run=sshd +bin=sshd +depends=ifconfig +s_value=60 diff --git a/packages/security/openssl/openssl b/packages/security/openssl/openssl new file mode 100644 index 0000000..b55a8b2 --- /dev/null +++ b/packages/security/openssl/openssl @@ -0,0 +1,23 @@ +# hdw-linux openssl extensions + +# author: hackbard + +# [S] 3-1 +# [V] 0.9.7d +# [D] openssl-0.9.7d.tar.gz http://www.openssl.org/source/ + +build_main() { + case "$hdw_arch_opt" in + i?86) trg=linux-elf ;; + *) echo "target not supported" + exit 1 ;; + esac + + ./Configure --prefix=$root/usr --openssldir=$root/etc/ssl $trg shared + mkdir -p $root/etc/ssl ; rm -rf $root/etc/ssl/{man,lib,include} + rm -rf $docdir ; mkdir -p $docdir ; cp -rv doc $docdir + ln -svf $root/usr/{lib,include} $root/etc/ssl + ln -vfs $prefix/man $docdir/man + ln -vfs $docdir/man $root/etc/ssl/man + make $make_conf install + } diff --git a/packages/security/sudo/sudo b/packages/security/sudo/sudo new file mode 100644 index 0000000..e508819 --- /dev/null +++ b/packages/security/sudo/sudo @@ -0,0 +1,10 @@ +# hdw-linux sudo extensions + +# author: hackbard + +# [S] 3-1 +# [V] 1.6.7p5 +# [D] sudo-1.6.7p5.tar.gz http://www.courtesan.com/sudo/dist/ + +confopt="$confopt --with-insults --with-all-insults" +confopt="$confopt --enable-log-host --with-tty-tickets" diff --git a/packages/security/tcp_wrappers/config.patch b/packages/security/tcp_wrappers/config.patch new file mode 100644 index 0000000..6057cdc --- /dev/null +++ b/packages/security/tcp_wrappers/config.patch @@ -0,0 +1,65 @@ +--- ./Makefile.orig Fri Mar 21 19:27:21 1997 ++++ ./Makefile Fri Apr 23 11:02:43 1999 +@@ -44,7 +44,7 @@ + #REAL_DAEMON_DIR=/usr/etc + # + # SysV.4 Solaris 2.x OSF AIX +-#REAL_DAEMON_DIR=/usr/sbin ++REAL_DAEMON_DIR=/usr/sbin + # + # BSD 4.4 + #REAL_DAEMON_DIR=/usr/libexec +@@ -144,7 +144,7 @@ + linux: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ + LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ +- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all ++ NETGROUP= TLI= EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DBROKEN_SO_LINGER" all + + # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. + hpux hpux8 hpux9 hpux10: +@@ -491,7 +491,7 @@ + # Uncomment the next definition to turn on the language extensions + # (examples: allow, deny, banners, twist and spawn). + # +-#STYLE = -DPROCESS_OPTIONS # Enable language extensions. ++STYLE = -DPROCESS_OPTIONS # Enable language extensions. + + ################################################################ + # Optional: Changing the default disposition of logfile records +@@ -514,7 +514,7 @@ + # + # The LOG_XXX names below are taken from the /usr/include/syslog.h file. + +-FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use ++FACILITY= LOG_AUTHPRIV # LOG_MAIL is what most sendmail daemons use + + # The syslog priority at which successful connections are logged. + +@@ -531,7 +531,7 @@ + # and with Solaris < 2.4. APPEND_DOT will not work with hostnames taken + # from /etc/hosts or from NIS maps. It does work with DNS through NIS. + # +-# DOT= -DAPPEND_DOT ++DOT= -DAPPEND_DOT + + ################################################## + # Optional: Always attempt remote username lookups +@@ -610,7 +610,7 @@ + # Paranoid mode implies hostname lookup. In order to disable hostname + # lookups altogether, see the next section. + +-PARANOID= -DPARANOID ++PARANOID= #-DPARANOID + + ######################################## + # Optional: turning off hostname lookups +@@ -623,7 +623,7 @@ + # In order to perform selective hostname lookups, disable paranoid + # mode (see previous section) and comment out the following definition. + +-HOSTNAME= -DALWAYS_HOSTNAME ++HOSTNAME= #-DALWAYS_HOSTNAME + + ############################################# + # Optional: Turning on host ADDRESS checking diff --git a/packages/security/tcp_wrappers/tcp_wrappers b/packages/security/tcp_wrappers/tcp_wrappers new file mode 100644 index 0000000..54cf715 --- /dev/null +++ b/packages/security/tcp_wrappers/tcp_wrappers @@ -0,0 +1,25 @@ +# hdw-linux tcp_wrappers extensions + +# author: hackbard + +# [S] 3-1 +# [V] 7.6 +# [D] tcp_wrappers_7.6.tar.gz ftp://ftp.porcupine.org/pub/security/ + +build_main() { + make linux + cp -v hosts_access.3 $root/usr/share/man/man3 + cp -v hosts_access.5 $root/usr/share/man/man5 + cp -v hosts_options.5 $root/usr/share/man/man5 + cp -v tcpd.8 tcpdchk.8 tcpdmatch.8 $root/usr/share/man/man8 + ln -sfv hosts_access.5 $root/usr/share/man/man5/hosts.allow.5 + ln -svf hosts_access.5 $root/usr/share/man/man5/hosts.deny.5 + cp libwrap.a $root/usr/lib + cp tcpd.h $root/usr/include + install -m755 safe_finger $root/usr/sbin + install -m755 tcpd $root/usr/sbin + install -m755 tcpdchk $root/usr/sbin + install -m755 tcpdmatch $root/usr/sbin + install -m755 try-from $root/usr/sbin + } + diff --git a/packages/soundtools/alsa/alsa b/packages/soundtools/alsa/alsa new file mode 100644 index 0000000..475d32d --- /dev/null +++ b/packages/soundtools/alsa/alsa @@ -0,0 +1,49 @@ +# hdw - linux alsa package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.5 +# [S] 3-10 +# [D] alsa-driver-1.0.5.tar.bz2 ftp://ftp.alsa-project.org/pub/driver/ +# [D] alsa-lib-1.0.5.tar.bz2 ftp://ftp.alsa-project.org/pub/lib/ +# [D] alsa-oss-1.0.5.tar.bz2 ftp://ftp.alsa-project.org/pub/oss-lib/ +# [D] alsa-utils-1.0.5.tar.bz2 ftp://ftp.alsa-project.org/pub/utils/ +# [D] alsa-tools-1.0.5.tar.bz2 ftp://ftp.alsa-project.org/pub/tools/ + +# only build the drivers? +onlydriver=0 + +# popular drivers (i have those ;) +card="emu10k1,intel8x0" + +oss_ver="0.9.8" + +confopt_x="$confopt" +confopt="$confopt --with-sequencer=yes --with-oss=yes --with-cards=$card" + +if [ "$onlydriver" = "0" ] ; then + +post_install() { + echo "extracting lib, utils and tools source ..." + for i in alsa-lib alsa-utils alsa-tools; do + tar --use-compress-program=bzip2 -xf \ + $archdir/$i-${ver}.tar.bz2 -C ../ + done + tar --use-compress-program=bzip2 -xf \ + $archdir/alsa-oss-${oss_ver}.tar.bz2 -C ../ + # building stuff + for i in alsa-lib- alsa-oss- alsa-utils-; do + echo "building ${i}..." + cd ../${i}* && ./configure $confopt_x && + make $make_conf && make $install_conf install + done + cd ../alsa-tools-* && + for i in ac3dec as10k1 seq/sbiload; do + echo "building ${i}..." + cd ./${i}* && ./configure $confopt_x && + make $make_conf && make $install_conf install && cd ../ + done + cd ../ + } + +fi diff --git a/packages/soundtools/alsa/no_depmod.patch b/packages/soundtools/alsa/no_depmod.patch new file mode 100644 index 0000000..f8612c7 --- /dev/null +++ b/packages/soundtools/alsa/no_depmod.patch @@ -0,0 +1,14 @@ +--- ./Makefile.orig 2003-09-04 05:06:40.000000000 +0200 ++++ ./Makefile 2003-09-04 05:07:08.000000000 +0200 +@@ -140,11 +140,6 @@ + rm -f $(DESTDIR)$(moddir)/snd*.o $(DESTDIR)$(moddir)/persist.o $(DESTDIR)$(moddir)/isapnp.o + endif + @for d in $(SUBDIRS); do if ! $(MAKE) -C $$d modules_install; then exit 1; fi; done +-ifeq ($(DESTDIR),) +- -/sbin/depmod -a $(kaversion) $(SYSTEM_MAP_OPT) +-else +- -/sbin/depmod -a -b $(DESTDIR)/ $(SYSTEM_MAP_OPT) $(kaversion) +-endif + + .PHONY: install-scripts + install-scripts: diff --git a/packages/soundtools/alsa/no_kconfig_check.patch b/packages/soundtools/alsa/no_kconfig_check.patch new file mode 100644 index 0000000..460d098 --- /dev/null +++ b/packages/soundtools/alsa/no_kconfig_check.patch @@ -0,0 +1,13 @@ +--- ./alsa-kernel/core/sound_oss.c.orig 2003-09-04 05:08:07.000000000 +0200 ++++ ./alsa-kernel/core/sound_oss.c 2003-09-04 05:08:57.000000000 +0200 +@@ -23,10 +23,6 @@ + + #ifdef CONFIG_SND_OSSEMUL + +-#if !defined(CONFIG_SOUND) && !(defined(MODULE) && defined(CONFIG_SOUND_MODULE)) +-#error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." +-#endif +- + #include + #include + #include diff --git a/packages/soundtools/ardour/ardour b/packages/soundtools/ardour/ardour new file mode 100644 index 0000000..787fbbb --- /dev/null +++ b/packages/soundtools/ardour/ardour @@ -0,0 +1,7 @@ +# hdw - linux ardour package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.9beta17.1 +# [S] 3-12 +# [D] ardour-0.9beta17.1.tar.bz2 http://ardour.org/releases/ diff --git a/packages/soundtools/jack/jack b/packages/soundtools/jack/jack new file mode 100644 index 0000000..1151ad8 --- /dev/null +++ b/packages/soundtools/jack/jack @@ -0,0 +1,11 @@ +# hdw - linux jack package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 3-10 +# [D] jack.tar.bz2 cvs:anonymous:cvs.jackit.sourceforge.net:cvsroot/jackit:jack + +pre_install() { + ./autogen.sh + } diff --git a/packages/soundtools/ladspa/ladspa b/packages/soundtools/ladspa/ladspa new file mode 100644 index 0000000..be03332 --- /dev/null +++ b/packages/soundtools/ladspa/ladspa @@ -0,0 +1,18 @@ +# hdw - linux ladsap package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.12 +# [S] 3-2 +# [D] ladspa_sdk_1.12.tgz http://www.ladspa.org/download/ + +srcdir="ladspa_sdk/src" + +pre_install() { + sed -e "s%/usr/local%$prefix%g" \ + -e 's/-mkdirhier/mkdir\ -p/g' makefile > makefile~ + mv makefile~ makefile + make clean + } + +make_conf="targets" diff --git a/packages/soundtools/liblrdf/liblrdf b/packages/soundtools/liblrdf/liblrdf new file mode 100644 index 0000000..ae54b20 --- /dev/null +++ b/packages/soundtools/liblrdf/liblrdf @@ -0,0 +1,7 @@ +# hdw - linux liblrdf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.3.7 +# [S] 3-11 +# [D] liblrdf-0.3.7.tar.gz http://plugin.org.uk/lrdf/ diff --git a/packages/soundtools/libmustux/getenv_fix.patch b/packages/soundtools/libmustux/getenv_fix.patch new file mode 100644 index 0000000..402baf8 --- /dev/null +++ b/packages/soundtools/libmustux/getenv_fix.patch @@ -0,0 +1,11 @@ +--- ./MustuxDebugger.cc.orig 2003-11-05 01:20:03.000000000 +0100 ++++ ./MustuxDebugger.cc 2003-11-05 01:20:42.000000000 +0100 +@@ -62,7 +62,7 @@ + + void MustuxDebugger::create_log(QString fn) + { +- logFileName = QString(std::getenv("HOME")) + "/" + fn; ++ logFileName = QString(getenv("HOME")) + "/" + fn; + logFile = fopen((const char*)logFileName.ascii(),"a+"); + if (!logFile) + { diff --git a/packages/soundtools/libmustux/libmustux b/packages/soundtools/libmustux/libmustux new file mode 100644 index 0000000..7aa271c --- /dev/null +++ b/packages/soundtools/libmustux/libmustux @@ -0,0 +1,7 @@ +# hdw - linux libmustux package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.20.2 +# [S] 3-11 +# [D] libmustux-0.20.2.tar.gz http://vt.shuis.tudelft.nl/~remon/protux/stable/version-0.20.2/ diff --git a/packages/soundtools/libsamplerate/libsamplerate b/packages/soundtools/libsamplerate/libsamplerate new file mode 100644 index 0000000..586dd10 --- /dev/null +++ b/packages/soundtools/libsamplerate/libsamplerate @@ -0,0 +1,7 @@ +# hdw - linux libsamplerate package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.1.0 +# [S] 3-2 +# [D] libsamplerate-0.1.0.tar.gz http://www.mega-nerd.com/SRC/ diff --git a/packages/soundtools/libsndfile/libsndfile b/packages/soundtools/libsndfile/libsndfile new file mode 100644 index 0000000..55e071d --- /dev/null +++ b/packages/soundtools/libsndfile/libsndfile @@ -0,0 +1,7 @@ +# hdw - linux libsndfile package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0.10 +# [S] 3-1 +# [D] libsndfile-1.0.10.tar.gz http://www.mega-nerd.com/libsndfile/ diff --git a/packages/soundtools/protux/protux b/packages/soundtools/protux/protux new file mode 100644 index 0000000..ea1a4f4 --- /dev/null +++ b/packages/soundtools/protux/protux @@ -0,0 +1,9 @@ +# hdw - linux protux package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.20.2 +# [S] 3-11 +# [D] protux-0.20.2.tar.gz http://vt.shuis.tudelft.nl/~remon/protux/stable/version-0.20.2/ + +confopt="$confopt --with-xinerama" diff --git a/packages/toolchain/binutils/binutils b/packages/toolchain/binutils/binutils new file mode 100644 index 0000000..08e3bc0 --- /dev/null +++ b/packages/toolchain/binutils/binutils @@ -0,0 +1,64 @@ +# hdw - linux toolchain binutils package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.15.91.0.1 +# [S] 0-1 0-4 0-5 +# [D] binutils-2.15.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/ + +if [ "$priority" = "1" ] ; then + confopt=${confopt//--host* /--host=$hdw_arch_build } + confopt="$confopt --disable-nls" + # use host system tools + hdw_arch_prefix="" + . ./scripts/optimization + unset CFLAGS + make_conf="LDFLAGS=-all-static" + libpath="$prefix/lib" +fi + +if [ "$priority" = "4" ] ; then + custmain=1 + custmain() { + # install binutils linking against new libc + cd $root/tmp/src.binutils/binutils-build + make -C ld install + cd - + rm -rf $root/tmp/src.binutils + + # show new linker to gcc + SPECFILE=$prefix/lib/gcc-lib/*/*/specs && + sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \ + -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \ + $SPECFILE > tempspecfile + mv tempspecfile $SPECFILE + unset SPECFILE + rm -f $prefix/lib/gcc-lib/*/*/include/pthread.h + rm -f $prefix/lib/gcc-lib/*/*/include/bits/sigthread.h + } +fi + +if [ "$priority" = "5" ] ; then + confopt="$confopt --enable-shared --with-lib-path=$prefix/lib" + make_conf="" + libpath="/usr/lib:/lib" +fi + +build_main() { + mkdir -p ../binutils-build + cd ../binutils-build + ../binutils-${ver}/configure $confopt && + [ "$priority" = "1" ] && make configure-host + make $make_conf && + make install + } + +post_install() { + # linkers default library path (where our glibc will go) + make -C ld clean + make -C ld $make_conf LIB_PATH=$libpath + # __very__ ___ugly___ + # store binutils tree to reinstall after glibc build + cd $root && mkdir -p tmp + rm -rf tmp/src.binutils && mv src.binutils tmp/ + } diff --git a/packages/toolchain/gcc/gcc b/packages/toolchain/gcc/gcc new file mode 100644 index 0000000..39e2b24 --- /dev/null +++ b/packages/toolchain/gcc/gcc @@ -0,0 +1,75 @@ +# hdw - linux toolchain gcc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.3.4 +# [S] 0-1 0-4 +# [D] gcc-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/ + + +extraver="-$ver" +[ "$ver" = "cvs" ] && extraver="" + +confopt="$confopt --enable-shared --with-local-prefix=$prefix" +confopt="$confopt --libexecdir=$prefix/lib" + +unset CFLAGS + +if [ "$priority" = "1" ] ; then + confopt=${confopt//--host* /--host=$hdw_arch_build } + confopt="$confopt --enable-languages=c --disable-nls" + + # use host system gcc tools + export CC="gcc" + export CXX="c++" + + make_conf="BOOT_LDFLAGS=\"-static\" bootstrap" + + post_install() { + ln -sf gcc $prefix/bin/cc + } +fi + +if [ "$priority" = "4" ] ; then + confopt="$confopt --enable-clocale=gnu --enable-threads=posix" + confopt="$confopt --enable-__cxa_atexit --enable-languages=c,c++" + confopt="$confopt --disable-libstdcxx-pch" + make_conf="" + + pre_install() { + echo "patching gcc specs now" + for i in gcc/config/*/{pa-,}linux*.h; do + echo "patching $i ..." + mv $i $i.orig + sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \ + $i.orig > $i + done + # patch sysv4 entries + for i in gcc/config/*/sysv4.h; do + echo "patching $i ..." + mv $i $i.orig + sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \ + $i.orig > $i + done + # sparc specific + for i in gcc/config/sparc/linux*.h; do + echo "patching $i ..." + mv $i $i.orig + sed "s%/usr/lib%$prefix/lib%g" $i.orig > $i + done + # general linux.h + echo "patching gcc/config/linux.h ..." + echo "#undef STANDARD_INCLUDE_DIR" >> gcc/config/linux.h + echo "#define STANDARD_INCLUDE_DIR 0" >> gcc/config/linux.h + # no fix includes + [ -f $hdw_home_dir/packages/base/gcc/no_fix_includes.patch ] && \ + patch -Nfp1 < $hdw_home_dir/packages/base/gcc/no_fix_includes.patch + } +fi + +build_main() { + mkdir -p ../gcc-build && cd ../gcc-build + ../gcc${extraver}/configure $confopt && + make $make_conf && + make install + } diff --git a/packages/toolchain/glibc/glibc b/packages/toolchain/glibc/glibc new file mode 100644 index 0000000..7653346 --- /dev/null +++ b/packages/toolchain/glibc/glibc @@ -0,0 +1,37 @@ +# hdw - linux toolchain glibc package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] cvs +# [S] 0-3 +## [D] glibc-2.3.2.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/ +## [D] glibc-linuxthreads-2.3.2.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/ +# [D] glibc.tar.bz2 cvs:anoncvs:sources.redhat.com:cvs/glibc:libc + +srcdir=libc +extraver="-${ver}" +[ "$ver" = "cvs" ] && extraver="" + +confopt=${confopt//--host* /--host=$hdw_arch_build } +confopt="$confopt --enable-add-ons=nptl --disable-profile --with-tls" +confopt="$confopt --without-cvs --without-gd" +confopt="$confopt --with-headers=$prefix/glibc-kernheaders" +confopt="$confopt --with-binutils=$prefix/bin" + +unset CFLAGS + +build_main() { + # create and change to seperated build directory + mkdir -p ../glibc-build && + cd ../glibc-build + + # configure and prepare Makefile + ../${srcdir}${extraver}/configure $confopt + + mkdir -p $prefix/etc + touch $prefix/etc/ld.so.conf + + # build and install ... + make && + make install + } diff --git a/packages/toolchain/linux-libc-headers/linux-libc-headers b/packages/toolchain/linux-libc-headers/linux-libc-headers new file mode 100644 index 0000000..4f95ebc --- /dev/null +++ b/packages/toolchain/linux-libc-headers/linux-libc-headers @@ -0,0 +1,14 @@ +# hdw - linux toolchain linux-libc-headers package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.6.7.0 +# [S] 0-1 +# [D] linux-libc-headers-2.6.7.0.tar.bz2 http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ + +arch=${hdw_arch//ia32/i386} + +build_main() { + cp -R include/asm-${arch} $prefix/include/asm + cp -R include/linux $prefix/include + } diff --git a/packages/toolchain/linux/linux b/packages/toolchain/linux/linux new file mode 100644 index 0000000..641b9d1 --- /dev/null +++ b/packages/toolchain/linux/linux @@ -0,0 +1,18 @@ +# hdw - linux toolchain linux package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.6.7 +# [S] 0-2 +# [D] linux-2.6.7.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ + +build_main() { + make mrproper && + make include/linux/version.h && + # change for crossbuilds + make include/asm && + mkdir -p $prefix/glibc-kernheaders + cp -HR include/asm $prefix/glibc-kernheaders + cp -R include/asm-generic $prefix/glibc-kernheaders + cp -R include/linux $prefix/glibc-kernheaders + } diff --git a/packages/x11/atk/atk b/packages/x11/atk/atk new file mode 100644 index 0000000..9ef8f6d --- /dev/null +++ b/packages/x11/atk/atk @@ -0,0 +1,10 @@ +# hdw - linux atk package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.7.1 +# [S] 3-7 +# [D] atk-1.7.1.tar.bz2 http://ftp.gnome.org/pub/gnome/sources/atk/1.7/ + +# optional +# confop="$confopt --disable-debug" diff --git a/packages/x11/expat/expat b/packages/x11/expat/expat new file mode 100644 index 0000000..87f719e --- /dev/null +++ b/packages/x11/expat/expat @@ -0,0 +1,7 @@ +# hdw - linux expat package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.95.7 +# [S] 3-2 +# [D] expat-1.95.7.tar.gz http://cesnet.dl.sourceforge.net/sourceforge/expat/ diff --git a/packages/x11/firefox/firefox b/packages/x11/firefox/firefox new file mode 100644 index 0000000..4a9835a --- /dev/null +++ b/packages/x11/firefox/firefox @@ -0,0 +1,42 @@ +# hdw - linux firefox package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.9 +# [S] 3-8 +# [D] firefox-0.9-source.tar.bz2 http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/0.9/ +# [D] install_flash_player_7_linux.tar.gz http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/7.0r25/ + +srcdir=mozilla +optimize="`echo $hdw_cflags | awk '{ print $1 }'`" +export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig" + +pre_install() { + export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1 MOZ_PHOENIX=1 + #sed "s,0000000000,hdw-linux -- ${hdw_version}," \ + # xpfe/global/build.dtd.in > xpfe/global/build.dtd.in.new + #mv xpfe/global/build.dtd.in.new xpfe/global/build.dtd.in + } + +confopt="$confopt --enable-default-toolkit=gtk2 --with-x --with-system-zlib" +confopt="$confopt --with-system-jpeg --with-system-png --with-extensions" +confopt="$confopt --enable-xft --enable-crypto --enable-xinerama" +confopt="$confopt --disable-tests --disable-debug --disable-dtd-debug" +confopt="$confopt --disable-pedantic --disable-logging --disable-accessibility" +confopt="$confopt --enable-strip --enable-strip-libs --enable-extensions=all" +confopt="$confopt --enable-optimize='$optimize'" + +post_install() { + cd $prefix/lib/mozilla-* + export MOZILLA_FIVE_HOME=$PWD + LD_LIBRARY_PATH=. ./regxpcom + LD_LIBRARY_PATH=. ./regchrome + touch `find $PWD -name *.rdf` + + # plugins + cd $root/src.$package + tar --use-compress-program=gzip -xvf \ + $archdir/install_flash_player_7_linux.tar.gz + cp install_flash_player_7_linux/{libflashplayer.so,flashplayer.xpt} \ + $MOZILLA_FIVE_HOME/plugins + } diff --git a/packages/x11/fontconfig/fontconfig b/packages/x11/fontconfig/fontconfig new file mode 100644 index 0000000..805ca43 --- /dev/null +++ b/packages/x11/fontconfig/fontconfig @@ -0,0 +1,7 @@ +# hdw - linux fontconfig package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.2.1 +# [S] 3-3 +# [D] fontconfig-2.2.1.tar.gz http://pdx.freedesktop.org/software/fontconfig/releases/ diff --git a/packages/x11/fontconfig/ft2build.patch b/packages/x11/fontconfig/ft2build.patch new file mode 100644 index 0000000..1ab6aa0 --- /dev/null +++ b/packages/x11/fontconfig/ft2build.patch @@ -0,0 +1,10 @@ +--- ./fontconfig/fcfreetype.h.orig 2004-07-17 14:23:34.000000000 +0200 ++++ ./fontconfig/fcfreetype.h 2004-07-17 14:24:45.000000000 +0200 +@@ -24,6 +24,7 @@ + + #ifndef _FCFREETYPE_H_ + #define _FCFREETYPE_H_ ++#include + #include + + FT_UInt diff --git a/packages/x11/fontconfig/ftmodule.patch b/packages/x11/fontconfig/ftmodule.patch new file mode 100644 index 0000000..04f8164 --- /dev/null +++ b/packages/x11/fontconfig/ftmodule.patch @@ -0,0 +1,11 @@ +--- ./src/fcfreetype.c.orig 2004-07-17 14:29:31.000000000 +0200 ++++ ./src/fcfreetype.c 2004-07-17 14:31:01.000000000 +0200 +@@ -57,7 +57,7 @@ + + #if (FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 4)) + #include +-#include ++#include FT_MODULE_H + #define USE_FTBDF + #define HAS_BDF_PROPERTY(f) ((f) && (f)->driver && \ + (f)->driver->root.clazz->get_interface) diff --git a/packages/x11/freetype/freetype b/packages/x11/freetype/freetype new file mode 100644 index 0000000..08d2c3e --- /dev/null +++ b/packages/x11/freetype/freetype @@ -0,0 +1,13 @@ +# hdw - linux freetype package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.1.9 +# [S] 3-2 +# [D] freetype-2.1.9.tar.bz2 ftp://ftp.freetype.org/freetype/freetype2/ + +post_install() { + # documentation + mkdir -p $docdir + cp -rv docs/* $docdir + } diff --git a/packages/x11/fvwm/fvwm b/packages/x11/fvwm/fvwm new file mode 100644 index 0000000..1031b7b --- /dev/null +++ b/packages/x11/fvwm/fvwm @@ -0,0 +1,7 @@ +# hdw - linux fvwm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.5.9 +# [S] 3-4 +# [D] fvwm-2.5.9.tar.bz2 ftp://ftp.fvwm.org/pub/fvwm/version-2/ diff --git a/packages/x11/ghostscript/ghostscript b/packages/x11/ghostscript/ghostscript new file mode 100644 index 0000000..0b0c864 --- /dev/null +++ b/packages/x11/ghostscript/ghostscript @@ -0,0 +1,23 @@ +# hdw-linux ghostscript extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 7.07.1 +# [S] 3-4 +# [D] espgs-7.07.1-source.tar.bz2 ftp://ftp.easysw.com/pub/ghostscript/ +# [D] gnu-gs-fonts-std-6.0.tar.gz ftp://ftp.easysw.com/pub/ghostscript/ +# [D] gnu-gs-fonts-other-6.0.tar.gz ftp://ftp.easysw.com/pub/ghostscript/ + +srcdir="espgs-$ver" +extra_ver="6.0" + +confopt="$confopt --with-drivers=ALL --with-x" + +post_install() { + mkdir -p $prefix/share/ghostscript/${extra_ver} && + for font in gnu-gs-fonts-std gnu-gs-fonts-other; do + tar --use-compress-program=gunzip -xf \ + $archdir/$font-${extra_ver}.tar.gz \ + -C $prefix/share/ghostscript/${extra_ver} + done + } diff --git a/packages/x11/gimp-print/gimp-print b/packages/x11/gimp-print/gimp-print new file mode 100644 index 0000000..943f04d --- /dev/null +++ b/packages/x11/gimp-print/gimp-print @@ -0,0 +1,9 @@ +# hdw - linux gimp-print package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 5.0.0-beta1 +# [S] 3-9 +# [D] gimp-print-5.0.0-beta1.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/gimp-print/ + +confopt="$confopt --with-cups --with-ghost --disable-user-guide" diff --git a/packages/x11/gimp/gimp b/packages/x11/gimp/gimp new file mode 100644 index 0000000..d4a230e --- /dev/null +++ b/packages/x11/gimp/gimp @@ -0,0 +1,9 @@ +# hdw - linux gimp package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.1.1 +# [S] 3-10 +# [D] gimp-2.1.1.tar.bz2 ftp://ftp.gwdg.de/pub/misc/grafik/gimp/gimp/v2.1/ + +confopt="$confopt --disable-print" diff --git a/packages/x11/glib/glib b/packages/x11/glib/glib new file mode 100644 index 0000000..482d52f --- /dev/null +++ b/packages/x11/glib/glib @@ -0,0 +1,10 @@ +# hdw - linux glib package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.4.4 +# [S] 3-5 +# [D] glib-2.4.4.tar.bz2 http://ftp.gnome.org/pub/gnome/sources/glib/2.4/ + +# optional +# confopt="$confopt --disable-debug" diff --git a/packages/x11/glib1/glib1 b/packages/x11/glib1/glib1 new file mode 100644 index 0000000..7d866c4 --- /dev/null +++ b/packages/x11/glib1/glib1 @@ -0,0 +1,11 @@ +# hdw - linux glib1 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.10 +# [S] 3-5 +# [D] glib-1.2.10.tar.gz http://ftp.gnome.org/pub/gnome/sources/glib/1.2/ + +srcdir="glib-$ver" +# optional +# confopt="$confopt --disable-debug" diff --git a/packages/x11/gtk+/gtk+ b/packages/x11/gtk+/gtk+ new file mode 100644 index 0000000..3966eec --- /dev/null +++ b/packages/x11/gtk+/gtk+ @@ -0,0 +1,12 @@ +# hdw - linux gtk+ package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.4.4 +# [S] 3-7 +# [D] gtk+-2.4.4.tar.bz2 http://ftp.gnome.org/pub/gnome/sources/gtk+/2.4/ + +export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig" + +# optional +# confopt="$confopt --disable-debug" diff --git a/packages/x11/gtk+1/gtk+1 b/packages/x11/gtk+1/gtk+1 new file mode 100644 index 0000000..5254b32 --- /dev/null +++ b/packages/x11/gtk+1/gtk+1 @@ -0,0 +1,12 @@ +# hdw - linux gtk+1 package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.10 +# [S] 3-7 +# [D] gtk+-1.2.10.tar.gz http://ftp.gnome.org/pub/gnome/sources/gtk+/1.2/ + +srcdir="gtk+-${ver}" + +# optional +# confopt="$confopt --disable-debug" diff --git a/packages/x11/gv/config.patch b/packages/x11/gv/config.patch new file mode 100644 index 0000000..ea68557 --- /dev/null +++ b/packages/x11/gv/config.patch @@ -0,0 +1,12 @@ +--- ./config.Unix.orig 2003-10-29 16:42:14.000000000 +0100 ++++ ./config.Unix 2003-10-29 16:43:01.000000000 +0100 +@@ -25,6 +25,9 @@ + XCOMM ** + XCOMM */ + ++XCOMM /* preprocessing way doesnt work, run the script */ ++#define CONVERT_INCLUDE_DIRECTIVES ++ + XCOMM #################################################################### + XCOMM ##### Miscellaneous settings + XCOMM #################################################################### diff --git a/packages/x11/gv/gv b/packages/x11/gv/gv new file mode 100644 index 0000000..819cb18 --- /dev/null +++ b/packages/x11/gv/gv @@ -0,0 +1,27 @@ +# hdw-linux gv extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 3.5.8 +# [S] 3-7 +# [D] gv-3.5.8.tar.gz ftp://ftpthep.physik.uni-mainz.de/pub/gv/unix/ + +make_conf="$make_conf Makefiles" + +pre_install() { + # patch the configuration + sed "s% /usr/local% $root/usr%" config.Unix > config_tmp + mv config_tmp config.Unix + [ -z "`echo $PATH | grep X11\/bin`" ] && \ + export PATH="$PATH:$root/usr/X11/bin" + echo "running xmkmf ..." + xmkmf + } + +post_install() { + echo "installing manpages ..." + make install.man && + echo "installing documentation ..." + rm -rf $docdir + make install.doc + } diff --git a/packages/x11/imagemagick/imagemagick b/packages/x11/imagemagick/imagemagick new file mode 100644 index 0000000..a2da69e --- /dev/null +++ b/packages/x11/imagemagick/imagemagick @@ -0,0 +1,15 @@ +# hdw - linux imagemagick package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 6.0.3-1 +# [S] 3-6 +# [D] ImageMagick-6.0.3-1.tar.bz2 ftp://ftp.fu-berlin.de/unix/X11/graphics/ImageMagick/ + +xtraver="`echo $ver | awk -F- '{ print $1 }'`" +srcdir="ImageMagick-${xtraver}" + +export CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" + +confopt="$confopt --enable-shared --with-modules --enable-lzw" +confopt="$confopt --enable-16bit-pixel --with-x" diff --git a/packages/x11/imlib/imlib b/packages/x11/imlib/imlib new file mode 100644 index 0000000..c58fd02 --- /dev/null +++ b/packages/x11/imlib/imlib @@ -0,0 +1,7 @@ +# hdw - linux imlib package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.9.14 +# [S] 3-7 +# [D] imlib-1.9.14.tar.bz2 http://ftp.gnome.org/pub/GNOME/sources/imlib/1.9/ diff --git a/packages/x11/lesstif/lesstif b/packages/x11/lesstif/lesstif new file mode 100644 index 0000000..5871f96 --- /dev/null +++ b/packages/x11/lesstif/lesstif @@ -0,0 +1,12 @@ +# hdw - linux lesstif package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.93.94 +# [S] 3-6 +# [D] lesstif-0.93.94.tar.bz2 http://belnet.dl.sourceforge.net/sourceforge/lesstif/ + +confopt=${confopt//--prefix* /--prefix=$root\/usr\/X11 } +confopt="$confopt --enable-build-Xlt --enable-build-Xbae" +confopt="$confopt --with-xdnd --with-editres --enable-production" +CC="$CC -L$root/src.lesstif/lesstif-$ver/lib/Xm-2.0" diff --git a/packages/x11/libart/libart b/packages/x11/libart/libart new file mode 100644 index 0000000..6b54738 --- /dev/null +++ b/packages/x11/libart/libart @@ -0,0 +1,7 @@ +# hdw - linux libart package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.3.16 +# [S] 3-7 +# [D] libart_lgpl-2.3.16.tar.bz2 http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/ diff --git a/packages/x11/libidl/libidl b/packages/x11/libidl/libidl new file mode 100644 index 0000000..5c7e064 --- /dev/null +++ b/packages/x11/libidl/libidl @@ -0,0 +1,12 @@ +# hdw - linux libidl package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.8.3 +# [S] 3-5 +# [D] libIDL-0.8.3.tar.bz2 ftp://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/ + +srcdir="libIDL-${ver}" + +# optional +# confopt="$confopt --disable-debug" diff --git a/packages/x11/libxml/libxml b/packages/x11/libxml/libxml new file mode 100644 index 0000000..0b2cbe3 --- /dev/null +++ b/packages/x11/libxml/libxml @@ -0,0 +1,7 @@ +# hdw - linux libxml package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 2.6.11 +# [S] 3-5 +# [D] libxml2-2.6.11.tar.bz2 ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/ diff --git a/packages/x11/mixerapp/mixerapp b/packages/x11/mixerapp/mixerapp new file mode 100644 index 0000000..51bd0ec --- /dev/null +++ b/packages/x11/mixerapp/mixerapp @@ -0,0 +1,15 @@ +# hdw - linux mixerapp package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.8.0 +# [S] 3-5 +# [D] Mixer.app-1.8.0.tar.gz http://www.fukt.bth.se/~per/mixer/ + +srcdir="Mixer.app-$ver" + +build_main() { + make + mkdir -p $prefix/bin && + install -s -m 0755 Mixer.app $prefix/bin + } diff --git a/packages/x11/mozilla/mozilla b/packages/x11/mozilla/mozilla new file mode 100644 index 0000000..b84a538 --- /dev/null +++ b/packages/x11/mozilla/mozilla @@ -0,0 +1,54 @@ +# hdw - linux mozilla package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.8a1 +# [S] 3-8 +# [D] mozilla-source-1.8a1.tar.bz2 http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.8a1/src/ +# [D] install_flash_player_7_linux.tar.gz http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/7.0r25/ + +pre_install() { + export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1 + export MOZILLA_FIVE_HOME=$root/usr/lib/mozilla-${ver} + sed "s,0000000000,hdw-linux -- ${hdw_version}," \ + xpfe/global/build.dtd.in > xpfe/global/build.dtd.in.new + mv xpfe/global/build.dtd.in.new xpfe/global/build.dtd.in + } + +confopt="$confopt --with-default-mozilla-five-home=$prefix/lib/mozilla-$ver" +confopt="$confopt --enable-default-toolkit=gtk2 --with-x --with-system-zlib" +confopt="$confopt --with-system-jpeg --with-system-png --with-extensions" +confopt="$confopt --enable-xft --enable-crypto --enable-xinerama" +confopt="$confopt --disable-tests --disable-debug --disable-dtd-debug" +confopt="$confopt --disable-pedantic --disable-logging --disable-accessibility" +confopt="$confopt --enable-strip --enable-strip-libs --enable-extensions=all" +confopt="$confopt --enable-jsd --enable-mathml --enable-module=psm" +confopt="$confopt --enable-optimize='$hdw_cflags'" + +post_install() { + install -d $prefix/include/mozilla-$ver/nss + cp -Lf dist/private/nss/*.h dist/public/nss/*.h \ + $prefix/include/mozilla-$ver/nss + ln -nsf mozilla-$ver $prefix/include/mozilla + ln -nsf mozilla-$ver $prefix/lib/mozilla + + cd $MOZILLA_FIVE_HOME + LD_LIBRARY_PATH=. ./regxpcom + LD_LIBRARY_PATH=. ./regchrome + + cat <<- EOT > $root/etc/profile.d/mozilla +export MOZILLA_FIVE_HOME=/usr/lib/mozilla-${ver} +EOT + + for i in lib{nspr4,plc4,plds4,nss3,smime3,softokn3,ssl3}.so \ + libsoftokn3.chk; do + ln -sf $prefix/lib/mozilla-$ver/$i $prefix/lib/$i + done + + # plugins + cd $root/src.$package + tar --use-compress-program=gzip -xvf \ + $archdir/install_flash_player_7_linux.tar.gz + cp install_flash_player_7_linux/{libflashplayer.so,flashplayer.xpt} \ + $MOZILLA_FIVE_HOME/plugins + } diff --git a/packages/x11/pango/pango b/packages/x11/pango/pango new file mode 100644 index 0000000..e8a20ef --- /dev/null +++ b/packages/x11/pango/pango @@ -0,0 +1,12 @@ +# hdw - linux pango package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.5.0 +# [S] 3-6 +# [D] pango-1.5.0.tar.bz2 http://ftp.gnome.org/pub/gnome/sources/pango/1.5/ + +export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig" + +# optional +# confopt="$confopt --disable-debug" diff --git a/packages/x11/pkgconfig/pkgconfig b/packages/x11/pkgconfig/pkgconfig new file mode 100644 index 0000000..9c0fe2c --- /dev/null +++ b/packages/x11/pkgconfig/pkgconfig @@ -0,0 +1,7 @@ +# hdw - linux pkgconfig package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.15.0 +# [S] 3-4 +# [D] pkgconfig-0.15.0.tar.gz http://www.freedesktop.org/software/pkgconfig/releases/ diff --git a/packages/x11/qt/qt b/packages/x11/qt/qt new file mode 100644 index 0000000..79aebd0 --- /dev/null +++ b/packages/x11/qt/qt @@ -0,0 +1,42 @@ +# hdw - linux qt package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.3.2 +# [S] 3-4 +# [D] qt-x11-free-3.3.2.tar.bz2 ftp://ftp.trolltech.com/qt/source/ + +pre_install() { + # where is qt stuff + export QTDIR=`pwd` + export PATH="$PATH:$QTDIR/bin" + export LD_LIBRARY_PATH="$QTDIR/lib" + + # modify configure, so it is none interactive + sed 's/read acceptance/acceptance="yes"/' configure > configure_tmp + mv -vf configure_tmp configure ; chmod 755 configure + } + +confopt="-prefix $prefix -headerdir $root/usr/include/qt" +confopt="$confopt -docdir $docdir" +confopt="$confopt -system-zlib -thread -no-stl -no-g++-exceptions" +confopt="$confopt -system-libpng -system-libjpeg -qt-gif" +confopt="$confopt -plugin-imgfmt-mng" + +post_install() { + # compatibility symlinks + for i in $prefix/lib/libqt-mt.so*; do + ln -svf $i ${i/-mt} + done + # documentation + mkdir -p $docdir + cp -r doc/man $prefix/man + cp -r examples $docdir + # profile + cat > $root/etc/profile.d/qt <<-EOP +QTDIR=$prefix +PATH="\$PATH:\$QTDIR/bin" +MANDIR="\$MANPATH:\$QTDIR/man" +export QTDIR PATH MANPATH +EOP + } diff --git a/packages/x11/synaptics/synaptics b/packages/x11/synaptics/synaptics new file mode 100644 index 0000000..6a8bad9 --- /dev/null +++ b/packages/x11/synaptics/synaptics @@ -0,0 +1,13 @@ +# hdw-linux synaptics extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 0.13.3 +# [S] 3-4 +# [D] synaptics-0.13.3.tar.bz2 http://w1.894.telia.com/~u89404340/touchpad/files/ + +pre_install() { + sed "s%BINDIR = .*%BINDIR = $prefix/bin%g" Makefile > m1~ + sed "s%CFLAGS = \(.*\)%CFLAGS = -I$prefix/X11R6/include \1%g" m1~ > m2~ + sed "s%CFLAGSCLIENT = \(.*\)%CFLAGSCLIENT = -I$prefix/X11R6/include \1%g" m2~ > Makefile + } diff --git a/packages/x11/t1lib/t1lib b/packages/x11/t1lib/t1lib new file mode 100644 index 0000000..8a76a43 --- /dev/null +++ b/packages/x11/t1lib/t1lib @@ -0,0 +1,12 @@ +# hdw - linux t1lib package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.3 +# [S] 3-7 +# [D] t1lib-1.3.tar.gz ftp://ftp.foolabs.com/pub/xpdf/ + +srcdir="T1Lib-$ver" + +# temporaly workaround +make_conf="without_doc" diff --git a/packages/x11/thunderbird/thunderbird b/packages/x11/thunderbird/thunderbird new file mode 100644 index 0000000..d930ac5 --- /dev/null +++ b/packages/x11/thunderbird/thunderbird @@ -0,0 +1,34 @@ +# hdw - linux thunderbird package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.7 +# [S] 3-8 +# [D] thunderbird-0.7-source.tar.bz2 http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/0.7/ + +srcdir=mozilla +optimize="`echo $hdw_cflags | awk '{ print $1 }'`" +export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig" + +pre_install() { + export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1 MOZ_THUNDERBIRD=1 + #sed "s,0000000000,hdw-linux -- ${hdw_version}," \ + # xpfe/global/build.dtd.in > xpfe/global/build.dtd.in.new + #mv xpfe/global/build.dtd.in.new xpfe/global/build.dtd.in + } + +confopt="$confopt --enable-default-toolkit=gtk2 --with-x --with-system-zlib" +confopt="$confopt --with-system-jpeg --with-system-png --with-extensions" +confopt="$confopt --enable-xft --enable-crypto --enable-xinerama" +confopt="$confopt --disable-tests --disable-debug --disable-dtd-debug" +confopt="$confopt --disable-pedantic --disable-logging --disable-accessibility" +confopt="$confopt --enable-strip --enable-strip-libs --enable-extensions=all" +confopt="$confopt --enable-optimize='$optimize'" + +post_install() { + cd $prefix/lib/mozilla-* + export MOZILLA_FIVE_HOME=$PWD + LD_LIBRARY_PATH=. ./regxpcom + LD_LIBRARY_PATH=. ./regchrome + touch `find $PWD -name *.rdf` + } diff --git a/packages/x11/windowmaker/windowmaker b/packages/x11/windowmaker/windowmaker new file mode 100644 index 0000000..2eb1c6e --- /dev/null +++ b/packages/x11/windowmaker/windowmaker @@ -0,0 +1,9 @@ +# hdw - linux windowmaker package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.80.2 +# [S] 3-4 +# [D] WindowMaker-0.80.2.tar.bz2 ftp://windowmaker.org/pub/source/release/ + +srcdir="WindowMaker-${ver}" diff --git a/packages/x11/wmapm/wmapm b/packages/x11/wmapm/wmapm new file mode 100644 index 0000000..ff4f8fa --- /dev/null +++ b/packages/x11/wmapm/wmapm @@ -0,0 +1,16 @@ +# hdw - linux wmapm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.1 +# [S] 3-4 +# [D] wmapm-3.1.tar.gz http://nis-www.lanl.gov/~mgh/WindowMaker/ + +build_main() { + cd wmapm && + make clean && + make && + mkdir -p $prefix/man/man1 $prefix/bin && + install -s -m 0755 wmapm $prefix/bin && + install -m 0644 wmapm.1 $prefix/man/man1 + } diff --git a/packages/x11/wmifs/makefile.patch b/packages/x11/wmifs/makefile.patch new file mode 100644 index 0000000..c1a72e6 --- /dev/null +++ b/packages/x11/wmifs/makefile.patch @@ -0,0 +1,11 @@ +--- wmifs.app/wmifs/Makefile.orig Mon Aug 26 11:42:35 2002 ++++ wmifs.app/wmifs/Makefile Mon Aug 26 11:42:47 2002 +@@ -7,7 +7,7 @@ + + + .c.o: +- cc -c -O2 -Wall $< -o $*.o ++ cc -I/usr/X11R6/include -c -O2 -Wall $< -o $*.o + + wmifs: $(OBJS) + cc -o wmifs $^ -lXext $(LIBDIR) $(LIBS) diff --git a/packages/x11/wmifs/wmifs b/packages/x11/wmifs/wmifs new file mode 100644 index 0000000..feb0833 --- /dev/null +++ b/packages/x11/wmifs/wmifs @@ -0,0 +1,19 @@ +# hdw - linux wmifs package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.3b1 +# [S] 3-4 +# [D] wmifs-1.3b1.tar.gz http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/files/ + +srcdir="wmifs.app" + +build_main() { + cd wmifs && + rm -fv *.o wmifs + make && + mkdir -p $sysconfdir $prefix/bin && + install -s -m 0755 wmifs $prefix/bin && + cp sample.wmifsrc ${sysconfdir}/wmifsrc && + chown root.root ${sysconfdir}/wmifsrc ; chmod 644 ${sysconfdir}/wmifsrc + } diff --git a/packages/x11/wmitime/makefile.patch b/packages/x11/wmitime/makefile.patch new file mode 100644 index 0000000..05742ef --- /dev/null +++ b/packages/x11/wmitime/makefile.patch @@ -0,0 +1,11 @@ +--- wmitime/wmitime/Makefile.orig Mon Aug 26 11:35:15 2002 ++++ wmitime/wmitime/Makefile Mon Aug 26 11:36:02 2002 +@@ -9,7 +9,7 @@ + + + .c.o: +- cc -I/usr/X11R6/share/include $(FLAGS) -D$(LANG) -c -Wall $< -o $*.o ++ cc -I/usr/X11R6/include $(FLAGS) -D$(LANG) -c -Wall $< -o $*.o + + wmtime: $(OBJS) + cc $(FLAGS) -D$(LANG) -o wmitime $^ -lXext $(LIBDIR) $(LIBS) diff --git a/packages/x11/wmitime/wmitime b/packages/x11/wmitime/wmitime new file mode 100644 index 0000000..662e019 --- /dev/null +++ b/packages/x11/wmitime/wmitime @@ -0,0 +1,17 @@ +# hdw - linux wmitime package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.3 +# [S] 3-4 +# [D] wmitime-0.3.tar.gz http://www.neotokyo.org/illusion/downloads/ + +build_main() { + cd wmitime && + export LANG="de" + make clean && + make && + mkdir -p $prefix/bin && + install -s -m 0755 wmitime $prefix/bin && + chown root.root $prefix/bin/wmitime + } diff --git a/packages/x11/wmmon/debian.patch b/packages/x11/wmmon/debian.patch new file mode 100644 index 0000000..7197c34 --- /dev/null +++ b/packages/x11/wmmon/debian.patch @@ -0,0 +1,686 @@ +--- wmmon-1.0b2.orig/wmgeneral/wmgeneral.c ++++ wmmon-1.0b2/wmgeneral/wmgeneral.c +@@ -12,6 +12,8 @@ + --- + CHANGES: + --- ++ 10/10/2003 (Simon Law, sfllaw@debian.org) ++ * changed the parse_rcfile function to use getline instead of fgets. + 02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl) + * changed the read_rc_file to parse_rcfile, as suggester by Marcelo E. Magallon + * debugged the parse_rc file. +@@ -21,6 +23,7 @@ + + */ + ++#define _GNU_SOURCE + #include + #include + #include +@@ -83,17 +86,18 @@ + void parse_rcfile(const char *filename, rckeys *keys) { + + char *p; +- char temp[128]; ++ char *line = NULL; ++ size_t line_size = 0; + char *tokens = " :\t\n"; + FILE *fp; + int i,key; + + fp = fopen(filename, "r"); + if (fp) { +- while (fgets(temp, 128, fp)) { ++ while (getline(&line, &line_size, fp) >= 0) { + key = 0; + while (key >= 0 && keys[key].label) { +- if ((p = strstr(temp, keys[key].label))) { ++ if ((p = strstr(line, keys[key].label))) { + p += strlen(keys[key].label); + p += strspn(p, tokens); + if ((i = strcspn(p, "#\n"))) p[i] = 0; +@@ -270,6 +274,7 @@ + unsigned int borderwidth = 1; + XClassHint classHint; + char *display_name = NULL; ++ char *geometry = NULL; + char *wname = argv[0]; + XTextProperty name; + +@@ -282,7 +287,9 @@ + + for (i=1; argv[i]; i++) { + if (!strcmp(argv[i], "-display")) +- display_name = argv[i+1]; ++ display_name = argv[++i]; ++ else if (!strcmp(argv[i], "-geometry")) ++ geometry = argv[++i]; + } + + if (!(display = XOpenDisplay(display_name))) { +@@ -307,7 +314,11 @@ + fore_pix = GetColor("black"); + + XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints, +- &mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy); ++ &mysizehints.x, &mysizehints.y, ++ &mysizehints.width, &mysizehints.height, &dummy); ++ if (geometry) ++ XParseGeometry(geometry, &mysizehints.x, &mysizehints.y, ++ &mysizehints.width, &mysizehints.height); + + mysizehints.width = 64; + mysizehints.height = 64; +@@ -364,3 +375,6 @@ + XMapWindow(display, win); + + } ++ ++/* vim: sw=4 ts=4 columns=82 ++ */ +--- wmmon-1.0b2.orig/wmmon/wmmon.c ++++ wmmon-1.0b2/wmmon/wmmon.c +@@ -28,6 +28,10 @@ + Changes: + ---- + ++ 23/10/2003 (Simon Law, sfllaw@debian.org) ++ * Eliminated exploitable static buffers ++ * Added -geometry support. ++ * /proc/meminfo support for Linux 2.6 + 18/05/1998 (Antoine Nulle, warp@xs4all.nl) + * MEM/SWAP/UPTIME only updated when visible + * Using global file descriptors to reduce file +@@ -65,6 +69,7 @@ + * First Working Version + */ + ++#define _GNU_SOURCE + #include + #include + #include +@@ -100,31 +105,27 @@ + /* Global Variables */ + /********************/ + +-char *ProgName; + int stat_current = 0; /* now global */ + FILE *fp_meminfo; + FILE *fp_stat; + FILE *fp_loadavg; + + /* functions */ +-void usage(void); ++void usage(char*); + void printversion(void); + void DrawStats(int *, int, int, int, int); + void DrawStats_io(int *, int, int, int, int); + + void wmmon_routine(int, char **); + +-void main(int argc, char *argv[]) { ++int main(int argc, char *argv[]) { + + int i; ++ char *name = argv[0]; + + + /* Parse Command Line */ + +- ProgName = argv[0]; +- if (strlen(ProgName) >= 5) +- ProgName += (strlen(ProgName) - 5); +- + for (i=1; i= 0) { ++ parse_rcfile(conffile, wmmon_keys); ++ free(conffile); ++ } + +- p = getenv("HOME"); +- strcpy(temp, p); +- strcat(temp, "/.wmmonrc"); +- parse_rcfile(temp, wmmon_keys); +- +- strcpy(temp, "/etc/wmmonrc.fixed"); +- parse_rcfile(temp, wmmon_keys); ++ if (asprintf(&conffile, "%s/.wmmonrc", getenv("HOME")) >= 0) { ++ parse_rcfile(conffile, wmmon_keys); ++ free(conffile); ++ } ++ ++ if (asprintf(&conffile, "/etc/wmmonrc.fixed") >= 0) { ++ parse_rcfile(conffile, wmmon_keys); ++ free(conffile); ++ } + + stat_online = checksysdevs(); + +@@ -269,26 +280,36 @@ + starttime = time(0); + nexttime = starttime + 10; + ++ /* Collect information on each panel */ + for (i=0; i= nexttime) { + nexttime+=10; + ++ if (curtime > nexttime) /* dont let APM suspends make this crazy */ ++ nexttime = curtime; ++ + for (i=0; irt_idle, &st->rt_stat, +- &free, &shared, &buffers, &cached); +- st->rt_idle >>= 10; +- st->rt_stat -= buffers+cached; +- st->rt_stat >>= 10; +-// break; +- } +- if (strstr(temp, "Swap:")) { +- sscanf(temp, "Swap: %ld %ld", &st2->rt_idle, &st2->rt_stat); +- st2->rt_idle >>= 10; +- st2->rt_stat >>= 10; +- break; ++ while ((getline(&line, &line_size, fp_meminfo)) > 0) { ++ /* The original format for the first two lines of /proc/meminfo was ++ * Mem: total used free shared buffers cached ++ * Swap: total used free ++ * ++ * As of at least 2.5.47 these two lines were removed, so that the ++ * required information has to come from the rest of the lines. ++ * On top of that, used is no longer recorded - you have to work ++ * this out yourself, from total - free. ++ * ++ * So, these changes below should work. They should also work with ++ * older kernels, too, since the new format has been available for ++ * ages. ++ */ ++ if (strstr(line, "MemTotal:")) { ++ sscanf(line, "MemTotal: %ld", &st->rt_idle); ++ } ++ else if (strstr(line, "MemFree:")) { ++ sscanf(line, "MemFree: %ld", &free); ++ } ++ else if (strstr(line, "MemShared:")) { ++ sscanf(line, "MemShared: %ld", &shared); ++ } ++ else if (strstr(line, "Buffers:")) { ++ sscanf(line, "Buffers: %ld", &buffers); ++ } ++ else if (strstr(line, "Cached:")) { ++ sscanf(line, "Cached: %ld", &cached); ++ } ++ else if (strstr(line, "SwapTotal:")) { ++ sscanf(line, "SwapTotal: %ld", &st2->rt_idle); ++ } ++ else if (strstr(line, "SwapFree:")) { ++ sscanf(line, "SwapFree: %ld", &swapfree); + } + } ++ ++ /* memory use - rt_stat is the amount used, it seems, and this isn't ++ * recorded in current version of /proc/meminfo (as of 2.5.47), so we ++ * calculate it from MemTotal - MemFree ++ */ ++ st->rt_stat = st->rt_idle - free; ++ st->rt_stat -= buffers+cached; ++ /* As with the amount of memory used, it's not recorded any more, so ++ * we have to calculate it ourselves. ++ */ ++ st2->rt_stat = st2->rt_idle - swapfree; + } + + void update_stat_swp(stat_dev *st) { + +- char temp[128]; ++ static char *line = NULL; ++ static size_t line_size = 0; ++ unsigned long swapfree; + + fseek(fp_meminfo, 0, SEEK_SET); +- while (fgets(temp, 128, fp_meminfo)) { +- if (strstr(temp, "Swap:")) { +- sscanf(temp, "Swap: %ld %ld", &st->rt_idle, &st->rt_stat); +- st->rt_idle >>= 10; +- st->rt_stat >>= 10; +- break; ++ while ((getline(&line, &line_size, fp_meminfo)) > 0) { ++ /* As with update_stat_mem(), the format change to /proc/meminfo has ++ * forced some changes here. */ ++ if (strstr(line, "SwapTotal:")) { ++ sscanf(line, "SwapTotal: %ld", &st->rt_idle); ++ } ++ else if (strstr(line, "SwapFree:")) { ++ sscanf(line, "SwapFree: %ld", &swapfree); + } + } +- ++ st->rt_stat = st->rt_idle - swapfree; + } + + /*******************************************************************************\ +@@ -545,11 +605,11 @@ + void get_statistics(char *devname, long *is, long *ds, long *idle) { + + int i; +- char temp[128]; ++ static char *line = NULL; ++ static size_t line_size = 0; + char *p; + char *tokens = " \t\n"; + float f; +- long maxdiskio=0; + + *is = 0; + *ds = 0; +@@ -557,9 +617,9 @@ + + if (!strncmp(devname, "cpu", 3)) { + fseek(fp_stat, 0, SEEK_SET); +- while (fgets(temp, 128, fp_stat)) { +- if (strstr(temp, "cpu")) { +- p = strtok(temp, tokens); ++ while ((getline(&line, &line_size, fp_stat)) > 0) { ++ if (strstr(line, "cpu ")) { ++ p = strtok(line, tokens); + /* 1..3, 4 == idle, we don't want idle! */ + for (i=0; i<3; i++) { + p = strtok(NULL, tokens); +@@ -577,17 +637,35 @@ + if (!strncmp(devname, "i/o", 3)) { + + fseek(fp_stat, 0, SEEK_SET); +- while (fgets(temp, 128, fp_stat)) { +- if (strstr(temp, "disk_rio") || strstr(temp, "disk_wio")) { +- p = strtok(temp, tokens); ++ while ((getline(&line, &line_size, fp_stat)) > 0) { ++ if (strstr(line, "disk_rio") || strstr(line, "disk_wio")) { ++ p = strtok(line, tokens); + /* 1..4 */ + for (i=0; i<4; i++) { + p = strtok(NULL, tokens); + *ds += atol(p); + } + } ++ else if (strstr(line, "disk_io")) { ++ int val; ++ unsigned int a, b, c, d, e, h, g; ++ ++ p = strtok(line, tokens); ++ ++ while ((p = strtok(NULL, tokens))) { ++ val = sscanf (p, ++ "(%d,%d):(%d,%d,%d,%d,%d)", ++ &a, &b, &c, &d, &e, &h, ++ &g); ++ ++ if (val != 7) ++ continue; ++ ++ *ds += d; ++ *ds += h; ++ } ++ } + } +- if (*ds > maxdiskio) maxdiskio = *ds; + } + } + +@@ -715,16 +793,16 @@ + |* usage *| + \*******************************************************************************/ + +-void usage(void) { +- +- fprintf(stderr, "\nwmmon - programming: tijno, (de)bugging & design warp, webhosting: bobby\n\n"); +- fprintf(stderr, "usage:\n"); +- fprintf(stderr, "\t-display \n"); +- fprintf(stderr, "\t-h\tthis screen\n"); +- fprintf(stderr, "\t-v\tprint the version number\n"); +- fprintf(stderr, "\t-i\tstartup in DiskIO mode\n"); +- fprintf(stderr, "\t-s\tstartup in SysInfo mode\n"); +- fprintf(stderr, "\n"); ++void usage(char *name) { ++ printf("Usage: %s [OPTION]...\n", name); ++ printf("WindowMaker dockapp that displays system information.\n"); ++ printf("\n"); ++ printf(" -display DISPLAY contact the DISPLAY X server\n"); ++ printf(" -geometry GEOMETRY position the clock at GEOMETRY\n"); ++ printf(" -i start in Disk I/O mode\n"); ++ printf(" -s start in System Info mode\n"); ++ printf(" -h display this help and exit\n"); ++ printf(" -v output version information and exit\n"); + } + + /*******************************************************************************\ +@@ -733,7 +811,7 @@ + + void printversion(void) { + +- if (!strcmp(ProgName, "wmmon")) { +- fprintf(stderr, "%s\n", WMMON_VERSION); +- } ++ printf("WMMon version %s\n", WMMON_VERSION); + } ++/* vim: sw=4 ts=4 columns=82 ++ */ +--- wmmon-1.0b2.orig/wmmon/wmmon.1 ++++ wmmon-1.0b2/wmmon/wmmon.1 +@@ -0,0 +1,185 @@ ++'\" t ++.\" Man page for wmmon ++.\" Copyright (c) 2003 Software in the Public Interest, Inc. ++.\" ++.\" This program is free software; you can redistribute it and/or modify ++.\" it under the terms of the GNU General Public License as published by ++.\" the Free Software Foundation; either version 2 of the License, or (at ++.\" your option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of ++.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++.\" General Public License for more details. ++.\" ++.\" You should have received a copy of the GNU General Public License ++.\" along with this program; if not, write to the Free Software ++.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. ++.\" ++.TH wmmon 1 "May 1998" "WMMON 1.0b2" ++ ++.SH NAME ++wmmon \- Window Maker dockapp for monitoring system information ++ ++.SH SYNOPSIS ++ ++.B wmmon ++[ ++.I OPTION ++] ++ ++.SH DESCRIPTION ++ ++.B WMMon ++monitors the realtime CPU load as well as the average system load, ++and gives you some nice additional features too. It is intended for ++docking in Window Maker. ++ ++It currently provides: ++ ++.IP \(bu 4 ++a realtime CPU stress meter; ++.IP \(bu ++an auto\-scaled average system load meter, like ++.B xload ++and ++.BR wmavgload ; ++.IP \(bu ++a realtime disk I/O stress meter; ++.IP \(bu ++auto\-scaled disk I/O load meter; ++.IP \(bu ++realtime memory and swap usage meters; ++.IP \(bu ++a display for system uptime; ++.IP \(bu ++three user\-defined commands to launch. ++ ++.SH OPTIONS ++ ++.TP ++.BI \-display \ display ++This option specifies the X server to contact; see ++.IR X(7x) . ++ ++.TP ++.BI \-geometry \ geometry ++This option specifies the preferred position of clock; see ++.IR X(7x) . ++ ++.TP ++.BR \-i ++start in disk I/O mode, which displays instantaneous disk usage and ++average disk load. ++ ++.TP ++.BR \-s ++start in system information mode, which displays memory usage, swap usage, ++and uptime. ++ ++.TP ++.B \-h ++Show help information. ++ ++.TP ++.B \-v ++Print the version number. ++ ++.SH USAGE ++The ++.B WMMon ++display can be cycled between CPU, disk I/O, and system ++information displays by clicking on the upper\-left widget. This ++displays CPU information by default. ++ ++WMMon can also be used to launch programs. You may click either left, ++middle, or right mouse buttons in the average\-load section of the ++window. The pre\-configured program will be launched according to the ++mouse button clicked. (see ++.B CONFIGURATION FILE ++below.) ++ ++In order to move ++.BR WMMon , ++drag on the outer edges. These are not sensitive to mouse clicks. ++ ++.SH "DOCKING IN WINDOW MANAGERS" ++ ++.TP ++Window Maker ++ ++Window Maker users should drag and drop the ++.B WMMon ++window on the Dock. Then, right\-click on the border of the window and ++select \*(lqSettings...\*(rq. Check \*(lqStart when Window Maker ++is started\*(rq. ++ ++.TP ++AfterStep ++ ++AfterStep users should put the following in their ++.I $HOME/.steprc ++ ++.RS 16 ++Wharf wmmon \- MaxSwallow "wmmon" wmmon & ++.RE ++ ++.TP ++Other window managers ++ ++.B WMMon ++runs nicely as a 64x64 shaped icon on your desktop. ++ ++.SH "CONFIGURATION FILE" ++ ++.B WMMon ++can launch three user\-defined commands, triggered by left, middle and ++right mouse button clicks. You can define the commands to launch in ++.I $HOME/.wmmonrc ++ ++.RS ++.PD 0 ++left: xterm ++.PP ++middle: xload ++.PP ++right: xcalc ++.PP ++.PD ++.RE ++ ++If ++.B WMMon ++detects a ++.I $HOME/.wmmonrc ++file, it will launch the appropriate command when you click on the clock. ++ ++The system administrator can define default commands in ++.IR /etc/wmmonrc . ++The administrator may also choose to \*(lqfix\*(rq particular commands, ++making it impossible for users to change. These commands can be defined in ++.IR /etc/wmmonrc.fixed , ++although this isn't a nice thing to do. ++ ++.SH FILES ++ ++.I /etc/wmmonrc ++.br ++.I $HOME/.wmmonrc ++.br ++.I /etc/wmmonrc.fixed ++ ++.SH AUTHORS ++ ++.B WMMon ++was written by Martijn Pieterse and Antoine Nulle. ++ ++This manual page was written by Simon Law for the ++.B Debian ++system (but may be used by others). It is based on the documentation provided ++by the original program. ++ ++This manual 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. diff --git a/packages/x11/wmmon/makefile.patch b/packages/x11/wmmon/makefile.patch new file mode 100644 index 0000000..e2a49c0 --- /dev/null +++ b/packages/x11/wmmon/makefile.patch @@ -0,0 +1,11 @@ +--- wmmon.app/wmmon/Makefile.orig Mon Aug 26 11:44:04 2002 ++++ wmmon.app/wmmon/Makefile Mon Aug 26 11:44:27 2002 +@@ -7,7 +7,7 @@ + + + .c.o: +- cc -c -O2 -Wall $< -o $*.o ++ cc -I/usr/X11R6/include -c -O2 -Wall $< -o $*.o + + wmmon: $(OBJS) + cc -o wmmon $^ $(LIBDIR) $(LIBS) diff --git a/packages/x11/wmmon/wmmon b/packages/x11/wmmon/wmmon new file mode 100644 index 0000000..1565ff5 --- /dev/null +++ b/packages/x11/wmmon/wmmon @@ -0,0 +1,17 @@ +# hdw - linux wmmon package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.0b2 +# [S] 3-4 +# [D] wmmon-1.0b2.tar.gz http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/files/ + +srcdir="wmmon.app" + +build_main() { + cd wmmon && + rm -fv *.o wmmon + make && + mkdir -p $prefix/bin && + install -s -m 0755 wmmon $prefix/bin + } diff --git a/packages/x11/wmnd/wmnd b/packages/x11/wmnd/wmnd new file mode 100644 index 0000000..0b15a00 --- /dev/null +++ b/packages/x11/wmnd/wmnd @@ -0,0 +1,7 @@ +# hdw - linux wmnd package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.4.9 +# [S] 3-4 +# [D] wmnd-0.4.9.tar.gz ftp://ftp.yuv.info/pub/wmnd/releases/ diff --git a/packages/x11/wmpower/wmpower b/packages/x11/wmpower/wmpower new file mode 100644 index 0000000..80a643c --- /dev/null +++ b/packages/x11/wmpower/wmpower @@ -0,0 +1,9 @@ +# hdw - linux wmpower package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0.3.0 +# [S] 3-4 +# [D] wmpower-0.3.0.tar.bz2 http://heanet.dl.sourceforge.net/sourceforge/wmpower/ + +export CPPFLAGS="$CPPFLAGS -I$prefix/X11/include" diff --git a/packages/x11/wmwave/makefile.patch b/packages/x11/wmwave/makefile.patch new file mode 100644 index 0000000..af61daa --- /dev/null +++ b/packages/x11/wmwave/makefile.patch @@ -0,0 +1,15 @@ +--- wmwave/Makefile.orig Mon Aug 26 11:45:30 2002 ++++ wmwave/Makefile Mon Aug 26 11:46:11 2002 +@@ -15,10 +15,10 @@ + default:all + + .c.o: +- cc -I/usr/X11R6/share/include $(FLAGS) -c -Wall $< -o $*.o ++ cc -I/usr/X11R6/include $(FLAGS) -c -Wall $< -o $*.o + + wmwave.o: wmwave.c wmwave-master.xpm +- cc -I/usr/X11R6/share/include $(FLAGS) -c -Wall wmwave.c -o $*.o ++ cc -I/usr/X11R6/include $(FLAGS) -c -Wall wmwave.c -o $*.o + + wmwave: $(OBJS) wmwave.o + cc $(FLAGS) -o wmwave $(OBJS) -lXext $(LIBDIR) $(LIBS) wmwave.o diff --git a/packages/x11/wmwave/wmwave b/packages/x11/wmwave/wmwave new file mode 100644 index 0000000..6440cdd --- /dev/null +++ b/packages/x11/wmwave/wmwave @@ -0,0 +1,15 @@ +# hdw - linux wmwave package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 0-4modified +# [S] 3-4 +# [D] wmwave.tar.bz2 http://www.hackdaworld.dyndns.org/download/hdw-linux/hdw-linux-0.3/sources/x11/wmwave/ + +build_main() { + rm -fv *.o wmwave + make && + mkdir -p $prefix/bin $sysconfdir $prefix/man/man1 && + install -s -m 0755 wmwave $prefix/bin && + install -m 0644 wmwave.1 $prefix/man/man1 + } diff --git a/packages/x11/wterm/wterm b/packages/x11/wterm/wterm new file mode 100644 index 0000000..5416910 --- /dev/null +++ b/packages/x11/wterm/wterm @@ -0,0 +1,11 @@ +# hdw - linux wterm package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 6.2.9 +# [S] 3-8 +# [D] wterm-6.2.9.tar.bz2 http://largo.windowmaker.org/files/ + +post_install() { + cp -v doc/etc/wterm.term* $sysconfdir + } diff --git a/packages/x11/xaw3d/imakefile.patch b/packages/x11/xaw3d/imakefile.patch new file mode 100644 index 0000000..6ee96d6 --- /dev/null +++ b/packages/x11/xaw3d/imakefile.patch @@ -0,0 +1,11 @@ +--- ./Imakefile.orig 2003-10-28 17:23:16.000000000 +0100 ++++ ./Imakefile 2003-10-28 17:37:17.000000000 +0100 +@@ -22,7 +22,7 @@ + #define IncSubSubdir Xaw3d + + XCOMM When building outside an X11 source tree: +-XCOMM EXTRA_INCLUDES = -I. ++EXTRA_INCLUDES = -I. + + #ifdef SharedXawReqs + REQUIREDLIBS = SharedXawReqs diff --git a/packages/x11/xaw3d/xaw3d b/packages/x11/xaw3d/xaw3d new file mode 100644 index 0000000..3f47c1e --- /dev/null +++ b/packages/x11/xaw3d/xaw3d @@ -0,0 +1,19 @@ +# hdw-linux xaw3d extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 1.5E +# [S] 3-6 +# [D] Xaw3d-1.5E.tar.gz http://www.visi.com/cgi-bin/cgiwrap/~hawkeyd/dnldcount.cgi?/ftp/users/hawkeyd/X/ + +srcdir="xc/lib/Xaw3d" + +pre_install() { + [ -z "`echo $PATH | grep X11\/bin`" ] && \ + export PATH="$PATH:$root/usr/X11/bin" + mkdir -p $prefix/X11R6/include/Xaw3d + ln -sf .. X11 + echo "running xmkmf ..." + xmkmf -a + make depend + } diff --git a/packages/x11/xfree86/config.patch b/packages/x11/xfree86/config.patch new file mode 100644 index 0000000..db9d79e --- /dev/null +++ b/packages/x11/xfree86/config.patch @@ -0,0 +1,8 @@ +--- ./config/cf/site.def.orig 2004-05-27 16:44:19.000000000 +0200 ++++ ./config/cf/site.def 2004-05-27 16:44:51.000000000 +0200 +@@ -146,3 +146,5 @@ + #include + + #endif /* AfterVendorCF */ ++ ++#define HasZlib Yes diff --git a/packages/x11/xfree86/xfree86 b/packages/x11/xfree86/xfree86 new file mode 100644 index 0000000..4a3de05 --- /dev/null +++ b/packages/x11/xfree86/xfree86 @@ -0,0 +1,46 @@ +# hdw-linux xfree86 extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 430 + +# [S] 3-3 +# [D] XFree86-4.4.0-src-1.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ +# [D] XFree86-4.4.0-src-2.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ +# [D] XFree86-4.4.0-src-3.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ +# [D] XFree86-4.4.0-src-4.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ +# [D] XFree86-4.4.0-src-5.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ +# [D] XFree86-4.4.0-src-6.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ +# [D] XFree86-4.4.0-src-7.tgz ftp://ftp.xfree86.org/pub/XFree86/4.4.0/source/ + +custmain="1" +custmain() { + # extracting sources + for i in 1 2 3 4 5 6 7; do + echo "extracting Xfree $ver package $i ..." + tar --use-compress-program=gzip \ + -xf $hdw_home_dir/download/x11/xfree86/XFree86-${ver}-src-${i}.tgz + done + + # change to build directory + cd xc + + # patching + for i in `ls -A $confdir/*.patch`; do + echo "applying patch .." + patch -Nfp1 < $i + done + + # build $ install + make World && make install && make install.man && + + # add entry to /etc/ld.so.conf + [ -z `grep 'X11' $root/etc/ld.so.conf` ] && \ + echo "/usr/X11R6/lib" >> $root/etc/ld.so.conf + + # add xdm + default config file (yes "" | xf86config ??) + + # symlink + ln -svf X11R6 $root/usr/X11 + } + diff --git a/packages/x11/xhkeys/xhkeys b/packages/x11/xhkeys/xhkeys new file mode 100644 index 0000000..2f3da98 --- /dev/null +++ b/packages/x11/xhkeys/xhkeys @@ -0,0 +1,11 @@ +# hdw-linux xhkeys extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 2.2.1 +# [S] 3-4 +# [D] xhkeys-2.2.1.tar.gz http://www.geocities.com/wmalms/ + +post_install() { + make install_doc + } diff --git a/packages/x11/xlockmore/xlockmore b/packages/x11/xlockmore/xlockmore new file mode 100644 index 0000000..fa96721 --- /dev/null +++ b/packages/x11/xlockmore/xlockmore @@ -0,0 +1,7 @@ +# hdw-linux xlockmore extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 5.12 +# [S] 3-4 +# [D] xlockmore-5.12.tar.bz2 ftp://ftp.tux.org/pub/tux/bagleyd/xlockmore/ diff --git a/packages/x11/xmms/xmms b/packages/x11/xmms/xmms new file mode 100644 index 0000000..e03f28d --- /dev/null +++ b/packages/x11/xmms/xmms @@ -0,0 +1,7 @@ +# hdw - linux xmms package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 1.2.10 +# [S] 3-8 +# [D] xmms-1.2.10.tar.bz2 http://www.xmms.org/files/1.2.x/ diff --git a/packages/x11/xorg/xorg b/packages/x11/xorg/xorg new file mode 100644 index 0000000..64a4b09 --- /dev/null +++ b/packages/x11/xorg/xorg @@ -0,0 +1,54 @@ +# hdw-linux xorg extensions + +# author: hackbard@hackdaworld.dyndns.org + +# [V] 6.7.0 + +# [S] 3-3 +# [D] X11R6.7.0-src1.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ +# [D] X11R6.7.0-src2.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ +# [D] X11R6.7.0-src3.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ +# [D] X11R6.7.0-src4.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ +# [D] X11R6.7.0-src5.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ +# [D] X11R6.7.0-src6.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ +# [D] X11R6.7.0-src7.tar.gz http://freedesktop.org/~xorg/X11R6.7.0/src/ + +custmain="1" +custmain() { + # extracting sources + for i in 1 2 3 4 5 6 7; do + echo "extracting xorg $ver package $i ..." + tar --use-compress-program=gzip \ + -xf $archdir/X11R${ver}-src${i}.tar.gz + done + + # change to build directory + cd xc + + # patching + if [ -f $confdir/*.patch ] ; then + for i in $confdir/*.patch; do + echo "applying patch .." + patch -Nfp1 < $i + done + fi + for file in `grep '' -r ./programs/Xserver/hw | \ + awk -F: '{ print $1 }'`; do + echo "patching file $file ..." + sed 's%#include %%g' $file > ${file}.tmp + mv ${file}.tmp $file + done + + # build $ install + make World && make install && make install.man && + + # add entry to /etc/ld.so.conf + [ -z `grep 'X11' $root/etc/ld.so.conf` ] && \ + echo "/usr/X11R6/lib" >> $root/etc/ld.so.conf + + # add xdm + default config file (yes "" | xf86config ??) + + # symlink + ln -svf X11R6 $root/usr/X11 + } + diff --git a/packages/x11/xpdf/xpdf b/packages/x11/xpdf/xpdf new file mode 100644 index 0000000..56be277 --- /dev/null +++ b/packages/x11/xpdf/xpdf @@ -0,0 +1,12 @@ +# hdw - linux xpdf package +# +# author: hackbard@hackdaworld.dyndns.org +# +# [V] 3.00-linux +# [S] 3-7 +# [D] xpdf-3.00.tar.gz ftp://ftp.foolabs.com/pub/xpdf/ + +confopt="$confopt --enable-a4-paper --with-gzip" + +[ -d $prefix/include/freetype2 ] && \ + confopt="$confopt --with-freetype2-includes=$prefix/include/freetype2" diff --git a/scripts/Build b/scripts/Build new file mode 100755 index 0000000..1500a9c --- /dev/null +++ b/scripts/Build @@ -0,0 +1,390 @@ +#! /bin/bash +# +# author: hackbard@hackdaworld.dyndns.org +# +# this script is used to build hdw-linux packages. +# + +hdw_status="" +package="" +no_src_del="" +priority="" +dir="*" + +while [ "$1" ] ; do + case "$1" in + -stage) hdw_status=$2 ; shift 2 ;; + -package) package=$2 ; shift 2 ;; + -no_src_del) no_src_del="1" ; shift 1 ;; + -priority) priority=$2 ; shift 2 ;; + -dir) dir=$2 ; shift 2 ;; + *) + echo + echo "Usage:" + echo + echo -e " ./scripts/Build \t-stage stagelevel" + echo -e "\t\t\t-package package-name" + echo + exit 1 ;; + esac +done + +if [ -z "$package" ]; then + echo "no package specified, abort." + exit 1 +fi + +if [ -z "$hdw_status" ]; then + echo "stage level not specified. something went wrong ... hey," + echo "this is a development version ;)" + exit 1 +fi + +if [ -z "$priority" ] ; then + echo "no priority specified, abort." + exit 1 +fi +export priority + +# load config andsubroutines +. ./scripts/Config -stage $hdw_status +. ./scripts/subroutines +# optimization +. ./scripts/optimization + +# check for dietlibc +if [ "$hdw_status" != "1" -a "$hdw_use_dietlibc" = "1" ] ; then + export CC="diet-dyn $CC -nostdinc" + export CXX="diet-dyn $CXX -nostdinc" +fi + +# okay, this is going to be fun - happy h4ck1n6 +# + +# defining build environment variables to build a package. +if [ "$dir" = "*" ] ; then + dirs="`ls ./packages/*/$package/$package`" + if [ "`echo $dirs | awk '{ print NF }'`" -gt "1" ] ; then + echo "please specify a category using -dir, possibilities:" + for dir in $dirs; do + echo "-> $dir" + done + exit 1 + else + dir="`echo $dirs | awk -F/ '{ print $3 }'`" + fi +fi + +if [ -f ./packages/$dir/$package/$package ] ; then +echo "found $package config file ..." + + # defining help variables + confdir="$hdw_home_dir/packages/$dir/$package" + archdir="$hdw_home_dir/download/$dir/$package" + + # lets get some package info + pkgs=`cat $confdir/$package | grep '^#\ \[D\]' | \ + awk '{ print $3 }'` + pkg=`echo $pkgs | awk '{ print $1 }'` # to make sure there is only 1 + ver=`cat $confdir/$package | grep '^#\ \[V\]' | \ + awk '{ print $3 }'` + patch=`cat $confdir/$package | grep '^#\ \[P\]' | \ + awk '{ print $3 }'` + + # lets see whether we have the source + if [ ! -f ./download/$dir/$package/$pkg -a ! -z "$pkg" ]; then + echo "sources for $package not found, trying to get them ..." + ./scripts/Download -package $package + fi + if [ ! -f ./download/$dir/$package/$pkg -a ! -z "$pkg" ]; then + echo "sources still not found, aborting ..." + exit 1 + fi + + # compress format of source? + if [ ! -z "`echo \`detect_file_ending $pkg\` | grep 'bz2'`" ] ; then + compress="bzip2" + elif [ ! -z "`echo \`detect_file_ending $pkg\` | grep 'tbz2'`"] ; then + compress="bzip2" + else + compress="gzip" + fi + + # + # defining elementary build functions and variables + # + custmain="0" + autoextract="1" + srcdir="$package*" + skip=""; s_reason="" + make_conf=""; install_conf="" + + prefix=""; docdir="" + if [ "$hdw_status" -lt "2" ] ; then + # use the symlink as prefix + prefix="/${s1_prefix}" + docdir="$prefix/share/doc/$package" + install_conf="PREFIX=$prefix" + else + if [ "$hdw_status" = "2" -o "$hdw_status" = "3" ] ; then + prefix="$root/usr"; docdir="$root/usr/doc/$package" + localstatedir="$root/var" + sysconfdir="$root/etc" + elif [ "$hdw_status" = "4" ] ; then + prefix="$root/opt/$package" + docdir="$root/opt/$package/doc" + localstatedir="$root/var/opt/$package" + sysconfdir="$root/etc/opt/$package" + fi + fi + + if [ -z "$prefix" ] ; then + echo "problem: no prefix found! aborting .." + exit 1 + fi + + # defining confopt now + confopt="--prefix=$prefix --bindir=$prefix/bin" + confopt="$confopt --sbindir=$prefix/sbin" + confopt="$confopt --libdir=$prefix/lib" + confopt="$confopt --datadir=$prefix/share" + confopt="$confopt --infodir=$prefix/info" + confopt="$confopt --mandir=$prefix/man" + confopt="$confopt --build=$hdw_arch_build" + confopt="$confopt --host=$hdw_arch_target" + # crosscompiling + [ "$hdw_crossbuild" != "0" ] && \ + confopt="$confopt --target=$hdw_arch_target" + if [ "$hdw_status" -gt "1" ] ; then + confopt="$confopt --localstatedir=$localstatedir" + confopt="$confopt --sysconfdir=$sysconfdir" + fi + + # buildfunctions + pre_install() { + echo "hdw rules!" + } + post_install() { + echo "hdw rules!" + } + build_main () { + echo + echo "hdw-linux: \$confopt = $confopt" + echo "hdw-linux: \$make_conf = $make_conf" + echo "hdw-linux: \$install_conf = $install_conf" + echo "lets do it ..." + if [ -f ./configure ] ; then + echo "run ./configure $confopt" + ./configure $confopt + fi + echo ; echo "run make $make_conf" + make $make_conf + echo ; echo "run make $install_conf install" + make $install_conf install + } + + # flist find variables/command + flist_path="bin/ boot/ etc/ lib/ opt/ sbin/ usr/ var/" + [ "$hdw_status" -lt "2" ] && flist_path="${flist_path} ${s1_prefix}/" + flist_cmd="find \$flist_path \( -cnewer $root/.time_$package -o \ + -newer $root/.time_$package \) \( -not -type d -o \ + -type d -empty \) -print" + flist_pruned="var/adm|var/log|var/run|var/tmp|var/spool" + flist_pruned="${flist_pruned}|var/cache|var/lock" + + # reading config functions and variables + . $confdir/$package + + # lets begin building, in case we dont skip it! + if [ -z "$skip" ] ; then + + # setting umask, we dont reset it! + umask 0022 + + # run ldconfig to, maybe we installed some libs before! + if [ "$hdw_status" != "1" ] ; then + echo "running ldconfig ..." + ldconfig + fi + + # for creating the flist + # + cd $root/ + touch .time_${package} && sleep 1 + cd $hdw_home_dir + + set -e + # use trap to catch errors in block + # we may kick out abort_when_package_build_failed lines + # can we use $_ instead off TRAP_ERR ? + { + trap 'abort_when_package_build_failed 1 $_' ERR + + # automated build procedure + if [ "$custmain" != "0" ] ; then + #build according packages custmain function + if [ "$no_src_del" != "1" ] ; then + rm -rf $root/src.$package + fi + mkdir -p $root/src.$package + cd $root/src.$package + if [ "$hdw_debug_buildenv" = "1" ] ; then + echo + echo "Debug: (buildenvironment)" + printenv + echo + fi + custmain + cd $hdw_home_dir + rm -rf $root/src.$package + else + #now we go for automated building + # automated extract + if [ "$no_src_del" != "1" ] ; then + if [ "$autoextract" != "0" ] ; then + rm -rf $root/src.$package + mkdir -p $root/src.$package + tar --use-compress-program=$compress \ + -xvf ./download/$dir/$package/$pkg \ + -C $root/src.$package + fi + fi + # change to directory and build + cd $root/src.$package/$srcdir && + # patches from [P] tag + if [ ! -z "$patch" ] ; then + for every_single_patch in $patch; do + echo "aplying patch $every_single_patch ..." + patch -Nfp1 < $hdw_home_dir/download/$dir/$package/$every_single_patch + done + echo + fi + # patches from confdir + # general patches + for xtra_patch in `ls $confdir/*.patch 2> /dev/null`; do + echo "applying patch $xtra_patch ..." + patch -Nfp1 < $xtra_patch + done + # architecture dependent patches + for xtra_patch in `ls $confdir/*.patch.${hdw_arch} 2> /dev/null`; do + echo "applying patch $xtra_patch ..." + patch -Nfp1 < $xtra_patch + done + # target specific patches + for xtra_patch in `ls $confdir/*.patch.${hdw_target} 2> /dev/null`; do + echo "applying patch $xtra_patch ..." + patch -Nfp1 < $xtra_patch + done + # dietlibc patches + if [ "$hdw_use_dietlibc" = "1" ] ; then + for xtra_patch in `ls $confdir/*.patch.dietlibc 2> /dev/null`; do + echo "applying patch $xtra_patch ..." + patch -Nfp1 < $xtra_patch + done + fi + # stage specific patches + for xtra_patch in `ls $confdir/*.patch.${hdw_status} 2> /dev/null`; do + echo "applying patch $xtra_patch ..." + patch -Nfp1 < $xtra_patch + done + # patch section end ;) + echo + pre_install + if [ "$hdw_debug_buildenv" = "1" ] ; then + echo + echo "Debug: (buildenvironment)" + printenv + echo + fi + build_main + post_install + cd $hdw_home_dir + rm -rf $root/src.$package + fi + # init + # dirty! not create *.init for 00-init-conf, manually done. + if [ "$package" != "00-init-conf" ] ; then + for my_init in `ls $confdir/*.init 2> /dev/null`; do + create_init $my_init + done + fi + # setup scripts + if [ "$hdw_status" != "1" ] ; then + for my_setup in `ls $confdir/*.setup 2> /dev/null`; do + create_setup_scripts $my_setup + done + fi + + # build dependencies (just libs >= stage 3, default target hardcoded) + # still in development !! + if [ "$hdw_status" -ge "2" ] ; then + rm -f $root/var/adm/deps/build/$package + echo -n "calculating dependencies ... " + alldeps="" + for lib in `grep '\ -l[A-Za-z]' \ + $root/var/adm/logs/${hdw_status}-${priority}-$package.out`; do + if [ -n "`echo $lib | grep '^-l'`" ] ; then + lib=${lib//-l/lib} + for dep in `grep "/$lib\." \ + -r $root/var/adm/flists | \ + awk -F: '{ print $2 }'`; do + add=1 + for cmp in $alldeps; do + [ "$cmp" = "$dep" ] && add=0 + done + [ "$add" = "1" ] && \ + alldeps="$dep $alldeps" + done + fi + done + for dep in $alldeps; do + echo "$dep" >> $root/var/adm/deps/build/$package + done + echo "done" + touch $root/var/adm/deps/build/$package + fi + + } + # end of trap block + + # let's see what we installed + # + cd $root/ + eval $flist_cmd | grep -vE $flist_pruned > flist.$package + + # let's create the flist + append="" + [ "$hdw_status" = "0" ] && append=".stage0" + [ "$hdw_status" = "1" ] && append=".stage1" + append="${append}-${priority}" + export package + export append + export hdw_status + export priority + awk '\ + BEGIN { package=ENVIRON["package"] ; append=ENVIRON["append"] ; \ + stage=ENVIRON["hdw_status"] ; priority=ENVIRON["priority"] } \ + { print package ": " $0 } \ + END { print package ": " "var/adm/logs/" stage "-" priority "-" \ + package ; \ + print package ": " "var/adm/flists/" package append }' \ + $root/flist.$package > $root/var/adm/flists/${package}${append} + [ "$hdw_status" -ge "3" ] && \ + echo "${package}: var/adm/deps/build/$package" >> \ + $root/var/adm/flists/${package}${append} + + # remove flist stuff + rm .time_${package} + rm flist.$package + cd $hdw_home_dir + + else + [ -z "$s_reason" ] && s_reason=unknown + echo + echo "FYI: $package build skipped, reason: $s_reason" + fi # (if [ -z "$skip" ]) + +else + echo "cannot find $package config file ..." + exit 1 +fi diff --git a/scripts/Build-Distro b/scripts/Build-Distro new file mode 100755 index 0000000..e1f1dd1 --- /dev/null +++ b/scripts/Build-Distro @@ -0,0 +1,277 @@ +#!/bin/bash +# +# author: hackbard@hackdaworld.dyndns.org +# +# this script is used to build the hdw-linux distribution. +# + +# define max priority +max=20 +stages="0 1" +no_src_del="" + +while [ "$1" ] ; do + case "$1" in + -chroot) stages="2 3" ; shift 1 ;; + -no_src_del) no_src_del="1" ; shift 1 ;; + *) echo + echo "Usage:" + echo + echo " ./scripts/Build-Distro" + echo " ./scripts/Build-Distro -chroot" + echo + echo " optional: -no_src_del" + echo + exit 1;; + esac +done + +# minimal check if everything is right. +if [ ! -f ./Config ] ; then + echo "./Config file not found. are you in correct directory?" + exit 1 +fi + +# reading subroutines, Config and otimization +. ./Config +. ./scripts/Config -stage `echo $stages | cut -b1` # wrong - we dont care! +. ./scripts/subroutines +. ./scripts/optimization + +# check system for required tools (what about gcc? ld? ...) +[ "$stages" = "0 1" ] && ./scripts/syscheck + +# build the stages +for stage in $stages; do + + if [ "$stage" = "0" ] ; then + echo + echo + echo -e "\a" + echo_y "welcome to hdw-linux!!" + echo + echo_y "let's start ..." + echo + sleep 3 + fi + + # calculating buildorder + if [ -f ./build_order_stage${stage} ] ; then + echo_w "found old buildorder, i am using it!" + echo_w "(remove ./build_order_stage${stage}, to calculate it)" + echo + else + echo_w "calculating buildorder for stage $stage ..." + create_buildorder $stage $max > \ + ./build_order_stage${stage} + if [ ! -f ./build_order_stage${stage} ] ; then + echo_r "can't create buildorder! aborting ..." + exit 1 + fi + fi + + # do stage relevant stuff at the beginning. + if [ "$stage" = "0" ]; then + # create the log directory + [ ! -d ${hdw_build_dir}/var/adm/logs ] && \ + mkdir -p ${hdw_build_dir}/var/adm/logs + [ ! -d ${hdw_build_dir}/var/adm/flists ] && \ + mkdir -p ${hdw_build_dir}/var/adm/flists + [ ! -d ${hdw_build_dir}/var/adm/deps ] && \ + mkdir -p ${hdw_build_dir}/var/adm/deps/{run,build} + # symlinking the stage 0/1 prefix to hostsystem root + if [ -d /$s1_prefix ]; then + if [ ! -L /$s1_prefix ]; then + echo_r "WARNING: " + echo_w "move /$s1_prefix to /${s1_prefix}_old" + mv /$s1_prefix /${s1_prefix}_old + fi + fi + ln -sf $hdw_build_dir/$s1_prefix / + fi + + # build according buildorder + cat ./build_order_stage${stage} | grep -v '^#' | \ + while read x pr dir package; do + # already build? + if [ ! -f $root/var/adm/logs/$stage-$pr-$package ]; then + echo + echo "building package `pkg_c $package`, stage $stage." + echo_w "log -> $root/var/adm/logs/$stage-$pr-$package" + echo_y "started, `date | awk '{ print $4 }'`" + b_append="" + [ ! -z "$no_src_del" ] && b_append="-no_src_del" + ./scripts/Build -stage $stage -package $package \ + -priority $pr -dir $dir $b_append > \ + $root/var/adm/logs/$stage-$pr-$package.out 2>&1 + if [ ! "$?" = "0" ]; then + echo_r "failed to build package $package!" + echo_r "aborted." + [ "$hdw_abort" = "1" ] && exit 1 + else + mv $root/var/adm/logs/$stage-$pr-$package.out \ + $root/var/adm/logs/$stage-$pr-$package + echo_g "done, `date | awk '{ print $4 }'`" + # make binary tar package + if [ "$hdw_make_package" = "1" -a \ + "$hdw_status" -ge "2" ] ; then + echo -n "creating binary package ..." + ./scripts/Create-Binary \ + -package $package-$pr \ + -tar-name $package \ + -root /$root > /dev/null 2>&1 + echo_g " done" + fi + fi + else + echo + echo_w "$package already build in stage $stage, skipped" + echo_w "remove $root/var/adm/logs/$stage-$pr-$package" + echo_w "if you want to rebuild it." + fi + done + # has there been a special exit code? + [ "$?" != "0" -a "$hdw_abort" = "1" ] && exit 1 + + # do stage relevant stuff at the end + if [ "$stage" != "3" ] ; then + echo + echo + echo_w "entering stage $((stage+1)) ..." + echo + elif [ "$stage" = "3" ] ; then + echo + echo + echo_g "finished last stage ..." + echo + fi + if [ "$stage" = "1" ]; then + # cleanup + for i in `mount | grep hdw-linux-${hdw_version} | \ + awk '{ print $3 }'`; do + echo_c "unmounting $i" + umount $i + done + umount $hdw_build_dir/dev/pts > /dev/null 2>&1 + [ "$?" = "0" ] && echo_c "unmounted devpts" + umount $hdw_build_dir/dev/shm > /dev/null 2>&1 + [ "$?" = "0" ] && echo_c "unmounted tmpfs" + umount $hdw_build_dir/dev > /dev/null 2>&1 + [ "$?" = "0" ] && echo_c "unmounted ramfs" + rm -rf $hdw_build_dir/dev/* + umount $hdw_build_dir/proc > /dev/null 2>&1 + [ "$?" = "0" ] && echo_c "unmounted procfs" + umount $hdw_build_dir/sys > /dev/null 2>&1 + [ "$?" = "0" ] && echo_c "unmounted sysfs" + + # saving old build_order_stage* files + for i in 2 3; do + [ -f $hdw_build_dir/usr/src/hdw-linux/build_order_stage${i} ] && \ + mv $hdw_build_dir/usr/src/hdw-linux/build_order_stage${i} $root/ + done + + # deleting sources to make sure they are the latest ... + if [ -d $root/usr/src/hdw-linux-${hdw_version} ] ; then + echo_c "deleting old hdw-linux sources ..." + rm -r $root/usr/src/hdw-linux* + fi + # well, following must be true :) + if [ ! -d $root/usr/src/hdw-linux-${hdw_version} ] ; then + echo_w "preparing hdw-linux sources ..." + # copying & mounting sources + mkdir -p $root/usr/src/hdw-linux-${hdw_version} + ln -s ./hdw-linux-${hdw_version} \ + $root/usr/src/hdw-linux + cp -r $hdw_home_dir/{doc,misc} $root/usr/src/hdw-linux + cp -r $hdw_home_dir/{packages,scripts,targets} \ + $root/usr/src/hdw-linux + cp $hdw_home_dir/Config \ + $root/usr/src/hdw-linux + mkdir -p $root/usr/src/hdw-linux/download + [ -d $hdw_home_dir/binaries ] && \ + mkdir -p $root/usr/src/hdw-linux/binaries + fi + # create chroot.sh file! we dont care if it already exists. + echo_c "preparing chroot commands ..." + cat > $root/chroot.sh <<- EOT +# PATH +export PATH="\$PATH:/${s1_prefix}/bin:/${s1_prefix}/sbin" +# create essential device nodes +mknod -m 600 /dev/console c 5 1 +mknod -m 666 /dev/null c 1 3 +# populate dev directory +udevstart +# add essential symlinks +ln -s /proc/self/fd /dev/fd +ln -s /proc/self/fd/0 /dev/stdin +ln -s /proc/self/fd/1 /dev/stdout +ln -s /proc/self/fd/2 /dev/stderr +ln -s /proc/kcore /dev/core +# build stages 2 & 3 +cd /usr/src/hdw-linux +. ./scripts/Build-Distro -chroot +EOT + chmod 700 $root/chroot.sh + + # restoring build_order_stage* files + for i in 2 3; do + [ -f $root/build_order_stage${i} ] && \ + mv $root/build_order_stage${i} $hdw_build_dir/usr/src/hdw-linux + done + + # finally mount stuff, do the chroot and build + echo_c "mounting packages + sysfs & proc filesystem ..." + mount --bind $hdw_home_dir/download \ + $root/usr/src/hdw-linux-${hdw_version}/download + [ -d $hdw_home_dir/binaries ] && \ + mount --bind $hdw_home_dir/binaries \ + $root/usr/src/hdw-linux-${hdw_version}/binaries + # obsolete -- udev + # mount -t devfs none $root/dev + mount -t proc proc $root/proc + mount -t sysfs sysfs $root/sys + mount -t ramfs ramfs $root/dev + mkdir -p $root/dev/{pts,shm} + mount -t tmpfs tmpfs $root/dev/shm + mount -t devpts devpts $root/dev/pts + echo_w "entering chroot and start building now ..." + echo + chroot $hdw_build_dir /${s1_prefix}/bin/env PS1='\u@\w\$ ' \ + PATH="/bin:/usr/bin:/sbin:/usr/sbin" HOME=/root \ + /${s1_prefix}/bin/bash --login +h /chroot.sh + if [ ! "$?" = "0" ]; then + echo_r "something failed in the chroot, aborting." + exit 1 + fi + # remove buildorder files + rm -f $root/usr/src/hdw-linux/build_order* + # last message + echo + echo_w "you should now have build your hdw-linux distro" + echo_w "you are on your own now... :)" + echo + echo_w "you should chroot to the target directory and make " + echo_w "further adaptions:" + echo_w "chroot $hdw_build_dir /bin/bash --login" + echo + echo_w "(modify at least /etc/fstab's / entry, set a passwd" + echo_w " for root + compile a new kernel if needed)" + echo + echo "if your hdw-build directory was not on a seperated" + echo "partition, use cp -a to copy it over. copy the created" + echo "kernel to your existing /boot partitition and tell your" + echo "bootloader (root device append!)" + echo + echo "bugreports -> hackbard@hackdaworld.dyndns.org" + echo + for i in `mount | grep hdw-linux-${hdw_version} | \ + awk '{ print $3 }'`; do + echo_c "unmounting $i ..." + umount $i + done + umount $hdw_home_dir/download + exit 0 + fi +done + +# end diff --git a/scripts/Build-Package b/scripts/Build-Package new file mode 100755 index 0000000..dce018c --- /dev/null +++ b/scripts/Build-Package @@ -0,0 +1,48 @@ +#! /bin/bash +# +# author: hackbard@hackdaworld.dyndns.org +# +# this script is used to build hdw-linux packages on a running system. +# + +package="" +stage="3" +bappend="" +priority="x" +dir="" + +if [ -z "$1" ] ; then + echo "usage: $0 [-stage ]" + exit 1 +fi + +while [ "$1" ] ; do + case "$1" in + -no_src_del) bappend="-no_src_del" ; shift 1 ;; + -stage) stage=$2 ; shift 2 ;; + -priority) priority=$2 ; shift 2 ;; + -dir) dir=$2 ; shift 2 ;; + *) package="$package $1" ; shift ;; + esac +done + +[ -n "$dir" ] && bappend="-dir $dir $bappend" + +for s_package in $package; do + echo "building package $package ..." + echo "log -> /var/adm/logs/$stage-$priority-$s_package(.out)" + . ./scripts/Build -package $s_package -priority $priority \ + -stage $stage $bappend > \ + /var/adm/logs/$stage-$priority-$s_package.out 2>&1 + returncode=$? + if [ "$returncode" = "0" ] ; then + mv /var/adm/logs/$stage-$priority-$s_package.out \ + /var/adm/logs/$stage-$priority-$s_package + echo "done building package $s_package" + echo + else + echo -n "build failed -> " + echo "/var/adm/logs/$stage-$priority-$s_package.out" + fi +done + diff --git a/scripts/Download b/scripts/Download new file mode 100755 index 0000000..2d0126c --- /dev/null +++ b/scripts/Download @@ -0,0 +1,256 @@ +#! /bin/sh +# +# author: miguel & hackbard +# +# This is the Download script used to fetch all the hdw-linux sources +# wheather it is from their original locations or from a mirror site +# +# To run the script use ./scripts/Download [ options ] + +mirror="" +package="" +no_cvs="0" +list_op="" +remove="0" + +while [ "$1" ] ; do + case "$1" in + -mirror) mirror="$2" ; shift 2 ;; + -package) package="$2" ; shift 2 ;; + -list-missing) list_op="missing" ; shift 1 ;; + -list-broken) list_op="broken" ; shift 1 ;; + -list-unknown) list_op="unknown" ; shift 1 ;; + -remove-unknown) + list_op="unknown" + remove="1" ; shift 1 ;; + -check-new) list_op="check_new" ; shift 1 ;; + -no_cvs) no_cvs="1" ; shift 1 ;; + *) echo + echo "usage:" + echo + echo " ./scripts/Download" + echo " ./scripts/Download -package " + echo + echo " use -no_cvs option to avoid refetching cvs-packages" + echo + echo "to fetch sources from a mirror:" + echo + echo " ./scripts/Download -mirror " + echo " ./scripts/Download -package -mirror " + echo + echo "other options:" + echo + echo " ./scripts/Download -list-missing" + echo " ./scripts/Download -list-broken" + echo " ./scripts/Download -list-unknown" + echo " ./scripts/Download -check-new" + echo " ./scripts/Download -remove-unknown" + echo " ./scripts/Download -no_cvs" + echo + exit 1 ;; + esac +done + +# we need to know some of the hdw specific variables. +. ./Config + +# running subroutines +. ./scripts/subroutines + +wget_cmd="wget --tries=3 --passive-ftp " +curl="curl --disable-epsv -s" + +# -list-missing & -list-broken (& -list-unknown) +if [ ! -z "$list_op" ] ; then + +for dir in `ls -A --ignore="CVS" ./download`; do + if [ -f ./download/$dir/PKGS ] ; then + cat ./download/$dir/PKGS | while read pkg file location; do + + case "$list_op" in + broken) + server=`echo $location | awk -F: '{print $1}'` + if [ "$server" = "ftp" ] ; then + # not very nice! + if $wget_cmd -O .ftp-index \ + $location 2> /dev/null; then + [ -z "`grep $file .ftp-index`" ] && \ + echo_r "$dir $file broken ($server - package)" + rm -f .ftp-index + else + echo_r "$dir $file broken ($server - directory)" + fi + elif [ "$server" = "http" ] ; then + $wget_cmd --spider $location$file 2> /dev/null + [ "$?" = "1" ] && \ + echo_r "$dir $file broken ($server - package)" + else + echo "$dir $file -> unable to search on $server server" + fi ;; + + check_new) + if [ -z "`type -p curl`" ]; then + echo "you need curl installed to use -check-new" + exit 1 + fi + prune=".sign|.deb|.rpm|.md5|.diff|.patch" + c_v="`grep '^#\ \[V\]' \ + \`find packages/*/$pkg/$pkg\` | + sed 's/^#\ \[V\]//'`" + server=`echo $location | awk -F: '{print $1}'` + ending="`detect_file_ending $file`" + mkdir -p ./check_tmp + if [ "$server" = "http" ] ; then + $curl $location | grep $pkg | grep $ending | grep -vE $prune | \ + sed -e 's/imgsrc.*"\//IMG\ "/'g -e 's///'g | \ + sed -e 's/ahref/A\ /'g -e 's/<\/a/<\/A/'g | \ + sed -e 's///'g -e 's/<\/A.*//'g | \ + sed 's/\ //g' > ./check_tmp/all-files + elif [ "$server" = "ftp" ] ; then + $curl $location | tr -s ' ' | cut -f9 -d' ' | \ + grep $pkg | grep $ending | grep -vE $prune \ + > ./check_tmp/all-files + else + echo "$pkg: only http/ftp servers supported" + exit 1 + fi + if [ -f ./check_tmp/all-files ]; then + echo "$pkg:" + echo "current version: $c_v" + echo "new versions:" + cat ./check_tmp/all-files + echo + fi ;; + + missing) + if [ "`echo $location | awk -F: '{ print $1 }'`" = "cvs" ]; then + if [ "$no_cvs" = "0" ] ; then + echo -n "$pkg is cvs-package, " + if [ ! -f ./download/$dir/$pkg/$file ] ; then + echo_r "missing" + else + echo_g "available" + fi + fi + else + if [ ! -f ./download/$dir/$pkg/$file ] ; then + echo -n "$pkg " + echo_r "missing" + fi + fi ;; + + unknown) + if [ -d ./download/$dir/$pkg ] ; then + objects="`ls -A ./download/$dir/$pkg`" + for i in $objects; do + known_f="`grep ^$pkg ./download/$dir/PKGS | \ + awk '{ print $2 }'`" + if [ -z "`echo $known_f | grep $i`" ] ; then + echo "./download/$dir/$pkg/$i unknown" + if [ "$remove" = "1" ] ; then + echo "removing ..." + rm ./download/$dir/$pkg/$i + fi + fi + done + fi ;; + esac + + done + fi +done + +exit 0 +fi + +# download a package +if [ ! -z "$package" ] ; then + +for dir in `ls -A --ignore="CVS" ./download`; do + if [ -f ./download/$dir/PKGS ] ; then + cat ./download/$dir/PKGS | while read pkg file location; do + + if [ "$package" = "$pkg" ] ; then + + is_cvs="`echo $location | awk -F: '{ print $1 }'`" + + # cvs + if [ "${is_cvs}" = "cvs" -o "${is_cvs}" = "sshcvs" ] ; then + if [ "$no_cvs" = "0" ] ; then + + user=`echo $location | awk -F: '{ print $2 }'` + loc=`echo $location | awk -F: '{ print $3 }'` + repos=`echo $location | awk -F: '{ print $4 }'` + module=`echo $location | awk -F: '{ print $5 }'` + #passwd=`echo $location | awk -F: '{ print $6 }'` + + echo "downloading $pkg using cvs ..." + [ ! -f $HOME/.cvspass ] && touch $HOME/.cvspass + mkdir -p ./download/$dir/$pkg ; cd ./download/$dir/$pkg + rm -rf $file $module + dlerror=0 + if [ "${is_cvs}" = "cvs" ] ; then + cvs -z 9 -d:pserver:${user}@${loc}:/${repos} co $module + [ "$?" != "0" ] && dlerror=1 + else + export CVS_RSH=ssh + cvs -d ${user}@${loc}:/${repos} co $module + [ "$?" != "0" ] && dlerror=1 + unset CVS_RSH + fi + if [ "$dlerror" = "0" ] ; then + echo + echo "making package ..." + tar cf `echo $file | sed 's/.tar.bz2//'`.tar \ + $module/ + bzip2 `echo $file | sed 's/.tar.bz2//'`.tar + fi + rm -rf $module + cd ../../.. + + fi + # tar.bz2 + elif [ "${is_cvs}" != "cvs" ] ; then + [ ! -z "$mirror" ] && \ + location="${mirror}/hdw-linux-${hdw_version}/$dir/$pkg/" + echo "Downloading $dir - package $file ..." + echo + mkdir -p ./download/$dir/$pkg ; cd ./download/$dir/$pkg + if [ -f ./$file ] ; then + echo "$file allready downloaded." + echo + else + $wget_cmd -c $location$file -O pkg-src.in && \ + mv pkg-src.in $file + echo "done." + fi + cd ../../.. + fi + + fi + done + fi +done +fi + +# download all packages needed for defined target +if [ -z "$package" ] ; then + +d_append="" +[ "$no_cvs" = "1" ] && d_append="-no_cvs" + +for pkg in `./scripts/Download -list-missing | awk '{ print $1 }'`; do + if [ ! -z "$mirror" ] ; then + cmd_mirror="-mirror $mirror" + else + cmd_mirror="" + fi + echo + . ./scripts/Download -package $pkg $cmd_mirror $d_append + echo +done + +fi + +# show list_unknown stuff +# coming soon :) diff --git a/scripts/Helper b/scripts/Helper new file mode 100755 index 0000000..ec9705c --- /dev/null +++ b/scripts/Helper @@ -0,0 +1,13 @@ +#!/bin/sh +# +# hdw - linux ./scripts/Helper script +# +# author: hackbard@hackdaworld.dyndns.org +# + +# reading Config file +. ./Config +. ./scripts/subroutines + +# soon there will be some usefull options available: +# - create new priorities according to dependencies diff --git a/scripts/Puzzle b/scripts/Puzzle new file mode 100755 index 0000000..5602e2c --- /dev/null +++ b/scripts/Puzzle @@ -0,0 +1,110 @@ +# +# hdw-linux Puzzle script +# +# author: hackbard +# +# script to create the PKGS file which keeps the packages to get +# downloaded and some meta information. +# + +# see what Config file says +. ./Config + +categories=`cat ./targets/$hdw_target/include | grep '^# \[C\]' | \ + awk '{ print $3 }'` +singlepackages=`cat ./targets/$hdw_target/include | grep '^# \[P\]' | \ + awk '{ print $3 }'` + +# add arch specific repository +categories="$categories $hdw_arch" + +# packages to get removed +delpackages=`cat ./targets/$hdw_target/include | grep '^# \[R\]' | \ + awk '{ print $3 }'` + +# check for dietlibc/glibc +if [ "$hdw_use_dietlibc" = "1" ]; then + [ -z "`echo $categories | grep diet`" ] && \ + singlepackages="$singlepackages diet/dietlibc" + delpackages="$delpackages base/glibc" +fi + +# remove all PKGS files +rm -rf ./download/*/PKGS + +# add all categorie packages +for dir in $categories; do + +if [ -d ./packages/$dir ] ; then + echo "Creating PKGS file for $dir ..." + mkdir -p ./download/$dir + rm -rf ./download/$dir/PKGS + + # parsing the config files now + ((counter1 = 0)) ; echo "Parsing and creating PKGS file ..." + for object in `ls -A --ignore="CVS" ./packages/$dir`; do + if [ "`echo $delpackages | grep $dir/$object`" = "" ]; then + + export pkg=$object + cat ./packages/$dir/$object/$object | grep '#\ \[D\]' | \ + awk '/^# \[D\]/ { gsub("^# \\[D\\] *", ""); + print ENVIRON["pkg"] " " $0 ; }' \ + >> ./download/$dir/PKGS + ((counter1 += 1)) + + fi + done + + # parsing config files for patches. + ((counter2 = 0)) ; echo "Parsing and adding patches to PKGS file ..." + for object in `ls -A --ignore="CVS" ./packages/$dir`; do + if [ "`echo $delpackages | grep $dir/$object`" = "" ]; then + + export pkg=$object + cat ./packages/$dir/$object/$object | grep '#\ \[P\]' | \ + awk '/^# \[P\]/ { gsub("^# \\[P\\] *", ""); + print ENVIRON["pkg"] " " $0 ; }' \ + >> ./download/$dir/PKGS + ((counter2 += 1)) + + fi + done + echo "done." + echo "$counter1 packages for $dir found." + echo + +else + echo "Error: didnt find the packages config files in ./packages/$dir" + echo +fi + +done + +echo "adding single packages from diffrent repositoriees to PKGS files ..." +echo +(( counter1 = 0 )) +for object in $singlepackages; do + dir=`echo $object | awk -F/ '{ print $1 }'` + object=`basename $object` + if [ -f ./packages/$dir/$object/$object ] ; then + [ ! -d ./download/$dir ] && mkdir -p ./download/$dir + echo "adding $object package from $dir" + export pkg=$object + cat ./packages/$dir/$object/$object | grep '#\ \[D\]' | \ + awk '/^# \[D\]/ { gsub("^# \\[D\\] *", ""); + print ENVIRON["pkg"] " " $0 ; }' \ + >> ./download/$dir/PKGS + (( counter1 += 1 )) + # also add the patches! + cat ./packages/$dir/$object/$object | grep '#\ \[P\]' | \ + awk '/^# \[P\]/ { gsub("^# \\[P\\] *", ""); + print ENVIRON["pkg"] " " $0 ; }' \ + >> ./download/$dir/PKGS + fi +done + +echo +echo "done." +echo "added $counter1 single packages" +echo + diff --git a/scripts/Update-Tree b/scripts/Update-Tree new file mode 100755 index 0000000..d3a32e7 --- /dev/null +++ b/scripts/Update-Tree @@ -0,0 +1,100 @@ +#!/bin/sh +# +# hdw - linux ./scripts/Update-Tree script +# +# author: hackbard@hackdaworld.dyndns.org +# + +# defaults +mode="keep" + +while [ "$1" ] ; do + case "$1" in + -mode) mode="$2" ; shift 2 ;; + *) echo "usage:" + echo + echo "$0 -mode [keep|del|update]" + echo + exit 1 ;; + esac +done + +# reading Config file +. ./Config + +# test - u need cvs installed! +if [ ! -f /usr/bin/cvs ] ; then + echo "you need cvs for updating the tree" + echo "aborting." + exit 1 +fi + +# make sure cvs works .. +[ ! -f $HOME/.cvspass ] && touch $HOME/.cvspass + +# does he use cvs? +if [ -d ./CVS ] ; then + echo "updating from official cvs tree first ..." + cvs up -d > /dev/null 2>&1 + echo "done" +fi + +# fetching packages +mkdir temp && cd temp +echo "fetching developers packages ..." +cvs -d:pserver:anonymous@hackdaworld.dyndns.org:/hdw-repos co packages targets > /dev/null 2>&1 +echo "done" + +# add targets to $part one day +for part in packages; do +for dir in `ls -A --ignore="CVS" ./$part`; do + if [ ! -d ../$part/$dir ] ; then + echo "creating new repository $dir ..." + mkdir ../$part/$dir + fi + for object in `ls -A --ignore="CVS" ./$part/$dir`; do + if [ ! -d ../$part/$dir/$object ] ; then + existing_p=`find ../$part -type d -name $object` + if [ -z "$existing_p" ] ; then + echo "creating new package $object" + mkdir ../$part/$dir/$object + cp -r ./$part/$dir/$object/* \ + ../$part/$dir/$object + else + if [ "$mode" = "del" ] ; then + echo "del mode: overwriting $object ..." + rm -rf $existing_p/* + cp -r ./$part/$dir/$object/* \ + $existing_p + else + echo "$object exists." + if [ "$mode" = "update" ] ; then + cd $existing_p + echo "running cvs ..." + cvs up -d >/dev/null 2>&1 + cd - + fi + fi + fi + else + if [ "$mode" = "del" ] ; then + echo "del mode: overwriting $object ..." + rm -rf ../$part/$dir/$object/* + cp -r ./$part/$dir/$object/* \ + ../$part/$dir/$object + echo "done" + else + echo "$object exists." + if [ "$mode" = "update" ] ; then + cd ../$part/$dir/$object + echo "running cvs ..." + cvs up -d >/dev/null 2>&1 + cd - + fi + fi + fi + done +done +done + +cd .. && rm -rf ./temp diff --git a/scripts/adapt_local b/scripts/adapt_local new file mode 100755 index 0000000..eda31fc --- /dev/null +++ b/scripts/adapt_local @@ -0,0 +1,45 @@ +# 19c3 +# hdw - linux ; adapt local configs +# + +root="" +target="" + +while [ "$1" ] ; do + case "$1" in + -cfg) config=$2 ; shift 2 ;; + -from) root=$2 ; shift 2 ;; + -to) target=$2 ; shift 2 ;; + *) echo "usage: $0 -cfg [full|]" + exit 1 ;; + esac +done + +# read config +. ./Config && +[ -z "$target" ] && target=$hdw_build_dir +echo "target -> $target <-" +[ -z "$target" ] && exit 1 + +run_it() { + echo "running: $@" + $@ + return $? +} + +if [ "$config" = "full" ] ; then + # full programm !! ;) + + # kernel config + run_it cp $root/usr/src/linux/.config $target/usr/src/linux/.config + # x11 + run_it cp $root/etc/X11/XF86Config* $target/etc/X11/ + # hdw config + for i in profile fstab hosts host.conf HOSTNAME resolv.conf conf/ ; do + run_it rm -rf $target/etc/$i + run_it cp -r $root/etc/$i $target/etc + done +fi + +echo "done" + diff --git a/scripts/create_cross_env b/scripts/create_cross_env new file mode 100755 index 0000000..e961017 --- /dev/null +++ b/scripts/create_cross_env @@ -0,0 +1,359 @@ +# hdw - linux create cross environment script +# +# author: hackbard@hackdaworld.dyndns.org +# +# this script is used to create the cross env +# + +# +# hopefully obsolete, as toolchain gets build in every build now! +# +# just kept for nostalgic reasons, and damn it was a lot work to type +# this bullshit here ... +# + +echo "create cross environment script obsolete now." +echo "we build a tool-chain in the beginning of stage 1" +echo "aborting ..." + +exit + +# some usefull functions +patch_it() { + package=$1 + patches=`ls $hdw_home_dir/packages/base/$package/*.patch` + for patch in $patches; do + echo "applying patch $patch ..." + patch -Nfp1 < $patch + done + patches=`ls $hdw_home_dir/packages/base/$package/*.patch.${hdw_arch}` + for patch in $patches; do + echo "applying patch $patch ..." + patch -Nfp1 < $patch + done + patches=`ls $hdw_home_dir/misc/crossbuild/$package/*.patch` + for patch in $patches; do + echo "applying patch $patch ..." + patch -Nfp1 < $patch + done + patches=`ls $hdw_home_dir/misc/crossbuild/$package/*.patch.${hdw_arch}` + for patch in $patches; do + echo "applying patch $patch ..." + patch -Nfp1 < $patch + done +} + +run_it() { + echo "running: $@" + $@ + return $? +} + +set_cflags() { + echo "set apropriate compiler flags ..." + export CC=cc AS=as LD=ld AR=ar NM=nm F77=f77 CXX=c++ + export STRIP=strip GASP=gasp RANLIB=ranlib KCC=kcc + unset CFLAGS +} + +# start + +cross_root="" +no_glibc="0" + +if [ ! -z "$1" ] ; then + # this seems to be a standalone call + . ./scripts/Config -stage 1 # no reason for other stage + . ./scripts/subroutines + # arguments + while [ "$1" ] ; do + case "$1" in + -cross_root) cross_root="$2" ; shift 2 ;; + -standalone) echo "default standalone call" + shift 1 ;; + -no_glibc) no_glibc="1" + echo "not building glibc" + shift 1 ;; + *) echo "usage:" + echo "$0 -cross_root foobar" + echo "$0 -standalone" + echo ; exit 1 ;; + esac + done +fi + +# small check +if [ -z "$hdw_build_dir" ] ; then + echo "debug: \$hdw_build_dir variable not set" + exit 1 +fi + +[ -z "$cross_root" ] && cross_root="$hdw_build_dir/crossenv-$hdw_arch" + +if [ ! -f $cross_root/.cross_env ] ; then + # prepare + echo + echo_r "warning: " + echo_y "crossbuilding is devel right now - you might crash your system!" + echo + echo_g "creating crossenv:" + echo -e "\a" ; sleep 2 + # creating the cross root directory + mkdir -p $cross_root + + # look for sources + for object in linux binutils; do + eval ${object}_src=`awk '/^# \[D\]/ { print $3 }' \ + packages/base/$object/$object | sort -r | tail -1` + eval ${object}_ver=`awk '/^# \[V\]/ { print $3 }' \ + packages/base/$object/$object` + eval tmp=\$${object}_src + if [ -f download/base/$object/$tmp ] ; then + echo "found $object package -> $tmp" + else + echo "$tmp missing, aborting." + exit 1 + fi + done + # gcc & glibc + gcc_src=`awk '/^# \[D\]/ { print $3 }' packages/base/gcc/gcc` + gcc_ver=`awk '/^# \[V\]/ { print $3 }' packages/base/gcc/gcc` + glibc_src=`awk '/^# \[D\]/ { print $3 }' packages/base/glibc/glibc` + glibc_ver=`awk '/^# \[V\]/ { print $3 }' packages/base/glibc/glibc` + for i in $gcc_src; do + if [ -f download/base/gcc/$i ] ; then + echo "found gcc package -> $i" + else + echo "$i missing, aborting." + exit 1 + fi + done + for i in $glibc_src; do + if [ -f download/base/glibc/$i ] ; then + echo "found glibc package -> $i" + else + echo "$i missing, aborting." + exit 1 + fi + done + gcc1_src=`echo $gcc_src | awk '{ print $1 }'` + gcc2_src=`echo $gcc_src | awk '{ print $2 }'` + g_a="" ; [ "$gcc_ver" != "cvs" ] && g_a="-$gcc_ver" + + # we need it in PATH + export PATH="$PATH:$cross_root/bin:$cross_root/$hdw_arch_target/bin" + + # create directories + echo + echo "creating build and crossenv directories ..." + mkdir -p $hdw_build_dir/src.crossenv + mkdir -p $cross_root/$hdw_arch_target/include + + # + # prepare confopt, make_conf, install_conf and cmd variables + # + # variables + set_cflags + + # build: + cd $hdw_build_dir/src.crossenv + + # essential headers + # linux headers + echo "creating linux-headers" + if [ -f .linux-header ] ; then + echo "linux headers already build, skipping ..." + echo "build date: -> `cat .linux-header`" + else + ( + echo "extracting linux source ..." + tar --use-compress-program=bzip2 \ + -xvf $hdw_home_dir/download/base/linux/$linux_src + cd linux-$linux_ver* && + # patching + patch_it linux + # make headers + run_it make include/linux/version.h + # copy them + echo "copy headers ..." + cp -rv include/linux $cross_root/$hdw_arch_target/include + cp -rv include/asm-$hdw_arch \ + $cross_root/$hdw_arch_target/include/asm + + cd .. + echo "`date`" > .linux-header + ) > linux-header.log 2>&1 + fi + # glibc headers + echo "creating glibc-headers" + if [ -f .glibc-header ] ; then + echo "glibc headers already build, skipping ..." + echo "build date: -> `cat .glibc-header`" + else + ( + for s_src in $glibc_src; do + echo "extracting $s_src ..." + foo="" + [ ! -z "`echo $s_src | grep threads`" ] && + foo="-C glibc-$glibc_ver" + tar --use-compress-program=bzip2 \ + -xvf $hdw_home_dir/download/base/glibc/$s_src $foo + done + mkdir -p glibc-build + cd glibc-build && + cd ../glibc-$glibc_ver + # patching + patch_it glibc + cd - + # install headers + run_it ../glibc-$glibc_ver/configure --prefix=$cross_root/$hdw_arch_target --enable-add-ons --with-headers=$cross_root/$hdw_arch_target/include --target=$hdw_arch_target $hdw_arch_build + abort_when_package_build_failed $? $_ + # according to Roland McGrath + run_it make crosscompiling=yes no_deps=t install-headers + # ignore errors .. + # abort_when_package_build_failed $? $_ + # copying some files + cd ../glibc-$glibc_ver + mkdir -p $cross_root/$hdw_arch_target/include/{gnu,bits} + cp -v include/features.h $cross_root/$hdw_arch_target/include + # cp bits/stdio_lim.h $cross_root/$hdw_arch_target/include/bits + touch $cross_root/$hdw_arch_target/include/gnu/stubs.h + cd .. + echo "`date`" > .glibc-header + ) > glibc-header.log 2>&1 + fi + # binutils + echo "creating cross binutils" + if [ -f .binutils ] ; then + echo "binutils already build, skipping ..." + echo "build date: -> `cat .binutils`" + else + ( + echo "extracting binutils source ..." + tar --use-compress-program=bzip2 \ + -xvf $hdw_home_dir/download/base/binutils/$binutils_src + cd binutils-* && + # patching + patch_it binutils + #build + run_it ./configure --prefix=$cross_root --program-prefix=$hdw_arch_prefix --target=$hdw_arch_target $hdw_arch_build + abort_when_package_build_failed $? $_ + run_it make all install + abort_when_package_build_failed $? $_ + cd .. + echo "`date`" > .binutils + ) > binutils.log 2>&1 + fi + # bootstrap gcc + echo "creating bootstrap gcc" + if [ -f .bootstrap-gcc ] ; then + echo "bootstrap gcc already build, skipping ..." + echo "build date: -> `cat .bootstrap-gcc`" + else + ( + echo "extracting gcc source ..." + tar --use-compress-program=bzip2 \ + -xvf $hdw_home_dir/download/base/gcc/$gcc1_src + mkdir gcc-build + cd gcc-build && + cd ../gcc${g_a} + # patching + patch_it gcc + cd - + # build + run_it ../gcc${g_a}/configure --prefix=$cross_root --program-prefix=$hdw_arch_prefix --disable-cpp --disable-shared --disable-multilib --enable-languages=c --target=$hdw_arch_target $hdw_arch_build + abort_when_package_build_failed $? $_ + run_it make all install + abort_when_package_build_failed $? $_ + cd .. + echo "`date`" > .bootstrap-gcc + ) > bootstrap-gcc.log 2>&1 + fi + + # end here for a kernel crosscompiler + if [ "$no_glibc" = "1" ] ; then + echo + echo "finished creating crossenvironment" + echo "you should now be able to build kernels for your alien." + echo "add $cross_root/bin to your PATH variable" + echo "edit ARCH and CROSS_COMPILE in your kernel's Makefile." + echo "have fun ..." + echo + exit 0 + fi + + # we need to specify the tools now + echo + echo "running optimization script to specify build tools" + echo + . $hdw_home_dir/scripts/optimization + + # glibc + echo "creating glibc" + if [ -f .glibc ] ; then + echo "glibc already build, skipping ..." + echo "build date: -> `cat .glibc`" + else + ( + echo "recreating build directory ..." + rm -rf glibc-build && mkdir glibc-build + cd glibc-build && + # build cross glibc + echo "debug: env variables" + set + echo + run_it ../glibc-$glibc_ver/configure --enable-add-ons --enable-shared --with-headers=$cross_root/$hdw_arch_target/include --build=$hdw_arch_build --host=$hdw_arch_target --prefix= + abort_when_package_build_failed $? $_ + run_it make + abort_when_package_build_failed $? $_ + run_it make install_root=$cross_root/$hdw_arch_target install + abort_when_package_build_failed $? $_ + cd .. + echo "`date`" > .glibc + ) > glibc.log 2>&1 + fi + # cross gcc + # we again need diffrent cflags + set_cflags + echo "creating cross gcc" + if [ -f .gcc ] ; then + echo "cross gcc already build, skipping ..." + echo "build date: -> `cat .gcc`" + else + ( + tar --use-compress-program=bzip2 \ + -xvf $hdw_home_dir/download/base/gcc/$gcc2_src + echo "recreating build directory ..." + rm -rf gcc-build && mkdir gcc-build + cd gcc-build && + #build + echo "debug: env variables" + set + echo + run_it ../gcc${g_a}/configure --prefix=$cross_root --program-prefix=$hdw_arch_prefix --enable-languages="c,c++" --enable-shared --enable-threads --disable-multilib --target=$hdw_arch_target $hdw_arch_build # --host=$hdw_arch_build --build=$hdw_arch_build + abort_when_package_build_failed $? $_ + run_it make + abort_when_package_build_failed $? $_ + run_it make install + abort_when_package_build_failed $? $_ + echo "`date`" > .gcc + ) > gcc.log 2>&1 + fi + + + # making note + date > $cross_root/.cross_env + echo "crossenvironment ready - here we go now ;) ..." +else + echo "crossenv allready existing, build at:" + echo "-> `cat $cross_root/.cross_env`" + if [ -z "`echo $PATH | grep $cross_root\/bin`" ] ; then + echo "just updating PATH variable ..." + export PATH="$PATH:$cross_root/bin" + export PATH="$PATH:$cross_root/$hdw_arch_target/bin" + fi +fi + +# return to home directory +cd $hdw_home_dir + diff --git a/scripts/optimization b/scripts/optimization new file mode 100755 index 0000000..016fb5e --- /dev/null +++ b/scripts/optimization @@ -0,0 +1,30 @@ +# hdw - linux ./scripts/optimization +# +# author: hackbard@hackdaworld.dyndns.org +# +# this script defines optmization flags + + +# the tools +export CC="${hdw_arch_prefix}gcc" +export CXX="${hdw_arch_prefix}c++" +export AS="${hdw_arch_prefix}as" +export STRIP="${hdw_arch_prefix}strip" +export LD="${hdw_arch_prefix}ld" +export GASP="${hdw_arch_prefix}gasp" +export AR="${hdw_arch_prefix}ar" +export RANLIB="${hdw_arch_prefix}ranlib" +export NM="${hdw_arch_prefix}nm" +export KCC="${hdw_arch_prefix}kcc" + +# flags - edit this at own risk +# export CPP +export CFLAGS="${hdw_cflags}" +# export CPPFLAGS +# export CXXFLAGS +# export ASFLAGS +# export ARFLAGS +# export LDFLAGS +# export LD_LIBRARY_PATH +# export LD_PRELOAD + diff --git a/scripts/subroutines b/scripts/subroutines new file mode 100755 index 0000000..7a85069 --- /dev/null +++ b/scripts/subroutines @@ -0,0 +1,257 @@ +#! /bin/sh +# +# author: hackbard@hackdaworld.dyndns.org +# +# this script defines functions used by the other scripts +# + +echo_r() { + echo -e "\e[01;31m${1}\e[0m" # Red + } + +echo_g() { + echo -e "\e[01;32m${1}\e[0m" # Green + } + +echo_y() { + echo -e "\e[01;33m${1}\e[0m" # Yellow + } + +echo_c() { + echo -e "\e[01;36m${1}\e[0m" # Cyan + } + +echo_w() { + echo -e "\e[01;37m${1}\e[0m" # White + } + +pkg_c() { + echo -en "\e[01;36m${1}\e[0m" + } + +warn_beep() { + (( n = 1 )) + while (( n <= 5 )) + do + echo -en "\a" + sleep 1 + (( n += 1 )) + done + } + +abort_when_package_build_failed() { + return="$1" + last="$2" + if [ "$return" != "0" -a "$hdw_abort" = "1" ]; then + echo "failed building package $package!" + echo "failed executing $last" + echo "abort." + warn_beep + echo + exit 1 + fi + } + +create_init() { + echo "creating init ..." + # default variables + run="`basename $1 | awk -F. '{ print $1 }'`" + bin=$package ; params="" ; depends="" ; exec="" + path=$prefix/sbin ; sec_append="exit 0" + sync_respawn="" ; use_pfh=0 + ((s_value=50)) + # reading variables + . $1 + # process + ((s2_value = 100 - s_value)) + if [ ! -d $root/etc/minit ] ; then + + echo "assuming sysvinit as init system!" + cat > $root/etc/init.d/$run << EOF +#!/bin/sh +# +# hdw - linux $root/etc/init.d/$run +# + +# remove this for automatic startup +$sec_append + +[ ! -f $path/$bin ] && exit 0 + +case "\$1" in + start) + echo "starting $run ..." + $path/$bin $params ;; + stop) + echo "stopping $run ..." + killall -15 $path/$bin ;; + restart) + echo "restarting $run ..." + killall -1 $path/$bin ;; + *) + echo "usage: \$0 [start|stop|restart]" + exit 1 ;; +esac +exit 0 +EOF + # permissions and links + chmod 750 $root/etc/init.d/$run + ln -sf ../$run $root/etc/init.d/rc2.d/S${s_value}${run} + ln -sf ../$run $root/etc/init.d/rc2.d/K${s2_value}${run} + else + echo "assuming minit as init system!" + mkdir -p $root/etc/minit/$run + if [ "$use_pfh" = "1" ] ; then + ln -sf $root/sbin/pidfilehack $root/etc/minit/$run/run + elif [ ! -z "$exec" ] ; then + rm -f $root/etc/minit/$run/run + echo "exec $exec" > $root/etc/minit/$run/run + else + ln -sf $path/$bin $root/etc/minit/$run/run + fi + [ ! -z "$sync_respawn" ] && \ + touch $root/etc/minit/$run/$snc_respawn + if [ ! -z "$params" ]; then + rm -f $root/etc/minit/$run/params + for i in $params; do + echo "$i" >> $root/etc/minit/$run/params + done + fi + if [ ! -z "$depends" ]; then + rm -f $root/etc/minit/$run/depends + for i in $depends; do + echo "$i" >> $root/etc/minit/$run/depends + done + fi + fi + } + +detect_file_ending() { + file="$1" + if [ "`echo $file | awk -F'tar\\\.' '{ print $2 }'`" = "bz2" ] ; then + echo "tar.bz2" + elif [ ! -z "`echo $file | grep '.tbz2'`" ] ; then + echo "tbz2" + fi + if [ "`echo $file | awk -F'tar\\\.' '{ print $2 }'`" = "gz" ] ; then + echo "tar.gz" + elif [ ! -z "`echo $file | grep '.tgz'`" ] ; then + echo "tgz" + elif [ ! -z "`echo $file | grep 'tar.Z'`" ] ; then + echo "tar.Z" + fi +} + +create_setup_scripts() { + destfile="`echo $1 | awk -F/ '{ print $NF }' | sed 's/\.setup//'`.sh" + cat > $root/etc/setup.d/$destfile << EOF +#!/bin/sh +# +# hdw - linux $root/etc/setup.d/$destfile +# + +EOF + if [ -z "`grep setup_block $1`" ] ; then + cat >> $root/etc/setup.d/$destfile << EOF +setup_block() { + echo "setup not supported" + } +EOF + fi + if [ -z "`grep uninstall_block $1`" ] ; then + cat >> $root/etc/setup.d/$destfile << EOF +uninstall_block() { + echo "uninstall not supported" + } +EOF + fi + cat $1 >> $root/etc/setup.d/$destfile + cat >> $root/etc/setup.d/$destfile << EOF +usage() { + echo "usage: \$0 [setup|uninstall]" + exit 1 + } + +[ -z "\$1" ] && usage + +while [ "\$1" ] ; do + case "\$1" in + setup) setup_block ; shift ;; + uninstall) uninstall_block ; shift ;; + *) usage ; exit 1 ;; + esac +done +EOF + chmod 750 $root/etc/setup.d/$destfile + } + +output_if_valid() { + local stage + local priority + local package + local dir + + package=$1 + stage=$2 + priority=$3 + dir="`echo $package | awk -F/ '{ print $3 }'`" + for match in `grep '^# \[S\]' $package | \ + awk '{ for(i=3;i<=NF;i++) print $i }'`; do + if [ "$stage-$priority" = "$match" ] ; then + echo -en "$stage \t $priority \t\t $dir " + echo -e "`basename $package`" + fi + done +} + +create_buildorder() { + local stage + stages=$1 + max_priority=$2 + + # categories + categories=`grep '^# \[C\]' ./targets/$hdw_target/include | \ + awk '{ print $3 }'` + categories="$categories $hdw_arch" + # add single packages to categories + singlepackages=`grep '^# \[P\]' ./targets/$hdw_target/include | \ + awk '{ print $3 }'` + [ ! -z "$singlepackages" ] && categories="$categories $singlepackages" + # packages to remove + delpackages=`grep '^# \[R\]' ./targets/$hdw_target/include | \ + awk '{ print $3 }'` + # use dietlibc? + if [ "$hdw_use_dietlibc" = "1" ] ; then + [ -z "`echo $categories | grep diet`"] && \ + singlepackages="$singlepackages diet/dietlibc" + delpackages="$delpackages base/glibc" + fi + + echo -e "#stage \t #priority \t #category package" + for stage in $stages; do + (( counter = -1 )) + while (( counter <= max_priority )); do + + ((counter += 1)) + for dir in $categories; do + for package in ./packages/$dir/[!C]*; do + + pkg=`basename $package` + if [ -d $package -a -f $package/$pkg ] ; then + + [ -z "`echo $delpackages | grep $dir/$pkg`" ] && \ + output_if_valid $package/`basename $package` \ + $stage $counter + + else + foo=`basename $dir` + [ -f ./packages/$dir/$foo ] && \ + output_if_valid ./packages/$dir/$foo \ + $stage $counter + fi + + done + done + done + done +} diff --git a/scripts/syscheck b/scripts/syscheck new file mode 100755 index 0000000..7994d67 --- /dev/null +++ b/scripts/syscheck @@ -0,0 +1,48 @@ +#! /bin/sh +# +# hdw - linux scripts/systemcheck +# +# author: miguel, modified by hackbard +# + +if [ "$1" ] ; then + echo "usage: $0" ; exit 1 +fi + +found_error=0 + +if [ -z "`type -p wget`" ] ; then + echo + echo "hdw system check: program 'wget' not found!" + echo "please install the lates wget version." + found_error=1 +fi + +if [ -z "`type -p tar`" ] ; then + echo + echo "hdw system check: program 'tar' not found!" + echo "please install the latest bzip2 version." + found_error=1 +fi + +if [ -z "`type -p cvs`" -a "$hdw_target" != "default" ] ; then + echo + echo "hdw system check: program 'cvs' not found!" + echo "please install the lates cvs version." + found_error=1 +fi + +if [ -z "`type -p bzip2`" ] ; then + echo + echo "hdw system check: program 'bzip2' not found!" + echo "please install the latest bzip2 version." + found_error=1 +fi + +if [ $found_error -ne 0 ] ; then + echo + echo "hdw system check found errors -> not doing anything." + echo +fi + +exit $found_error diff --git a/targets/all-dev/include b/targets/all-dev/include new file mode 100644 index 0000000..c4bfaef --- /dev/null +++ b/targets/all-dev/include @@ -0,0 +1,21 @@ +# hdw - linux all-dev target +# +# author: hackbard +# + +# [C] toolchain +# [C] base +# [C] devel +# [C] hackbard +# [C] hpc +# [C] multimedia +# [C] net +# [C] security + +# [C] x11 +# replaced by xorg due to license stuff +# [R] x11/xfree86 + +# [C] science +# [C] soundtools +# [C] optional diff --git a/targets/default/include b/targets/default/include new file mode 100644 index 0000000..a8f4891 --- /dev/null +++ b/targets/default/include @@ -0,0 +1,11 @@ +# hdw-linux target default, lists of categories and packages included +# +# damn, this is still hardcoded! but once packages have to be chosen! +# +# author: hackbard +# + +# [C] toolchain +# [C] base + +# [R] ia32/syslinux diff --git a/targets/desktop/include b/targets/desktop/include new file mode 100644 index 0000000..7cfc982 --- /dev/null +++ b/targets/desktop/include @@ -0,0 +1,35 @@ +# hdw - linux desktop target +# +# author: hackbard +# + +# [C] toolchain +# [C] base + +# [C] x11 +# xfree86 replaced by xorg due to license stuff +# [R] x11/xfree86 +# mozilla replaced by firefox & thunderbird +# [R] x11/mozilla + +# [C] security +# [C] science + +# [C] net +# [R] net/wireless_tools +# [R] net/rarpd + +# [C] multimedia +# [C] soundtools + +# [C] devel + +# [C] hackbard +# [R] hackbard/aeolus +# [R] hackbard/apache +# [R] hackbard/pcmcia-cs +# [R] hackbard/gpsd +# [R] hackbard/cvsd +# [R] hackbard/minimalist +# [R] hackbard/lprng +# [R] hackbard/magicfilter diff --git a/targets/fai-server/include b/targets/fai-server/include new file mode 100644 index 0000000..5b3d6d7 --- /dev/null +++ b/targets/fai-server/include @@ -0,0 +1,10 @@ +# hdw-linux target fai-server +# +# author: hackbard +# + +# [C] toolchain +# [C] base + +# [P] net/nfs-utils +# [P] net/tftp-hpa diff --git a/targets/fefe/include b/targets/fefe/include new file mode 100644 index 0000000..9492f65 --- /dev/null +++ b/targets/fefe/include @@ -0,0 +1,29 @@ +# hdw - linux fefe target +# +# author: hackbard +# + +# [C] toolchain + +# [C] diet + +# [C] base +# [R] base/sysvinit + +# [C] devel +# [C] hackbard +# [C] hpc +# [C] multimedia +# [C] net +# [C] security + +# [C] x11 +# xfree86 replaced by xorg due to license stuff +# [R] x11/xfree86 +# mozilla replaced by firefox & thunderbird +# [R] x11/mozilla + +# [C] science +# [C] soundtools + +# [R] ia32/syslinux diff --git a/targets/mobile/include b/targets/mobile/include new file mode 100644 index 0000000..016743f --- /dev/null +++ b/targets/mobile/include @@ -0,0 +1,32 @@ +# hdw - linux mobile target +# +# author: hackbard +# + +# [C] toolchain +# [C] base + +# [C] x11 +# xfree86 replaced by xorg due to license stuff +# [R] x11/xfree86 +# mozilla replaced by firefox & thunderbird +# [R] x11/mozilla + +# [C] security +# [C] science + +# [C] net +# [R] net/rarpd + +# [C] multimedia + +# [P] soundtools/alsa +# [P] soundtools/esound + +# [C] hackbard +# [R] hackbard/minimalist +# [R] hackbard/cvsd +# [R] hackbard/lprng +# [R] hackbard/magicfilter + +# [C] devel diff --git a/targets/router/include b/targets/router/include new file mode 100644 index 0000000..f3b5401 --- /dev/null +++ b/targets/router/include @@ -0,0 +1,43 @@ +# hdw - linux router target +# +# author: hackbard +# + +# [C] toolchain +# [C] base +# [C] security +# [C] net +# [R] net/rarpd + +# [C] devel + +# [P] hackbard/apache +# [P] hackbard/bc +# [P] hackbard/cron +# [P] hackbard/curl +# [P] hackbard/cvsd +# [P] hackbard/elftoaout +# [P] hackbard/fbset +# [P] hackbard/ipcheck +# [P] hackbard/irssi +# [P] hackbard/lprng +# [P] hackbard/ltrace +# [P] hackbard/minicom +# [P] hackbard/minimalist +# [P] hackbard/openldap +# [P] hackbard/pcmcia-cs +# [P] hackbard/pine +# [P] hackbard/rsync +# [P] hackbard/sendmail +# [P] hackbard/sersniff +# [P] hackbard/strace +# [P] hackbard/unzip +# [P] hackbard/zip +# [P] hackbard/apmd +# [P] hackbard/procmail +# [P] hackbard/isdn4k-utils +# [P] hackbard/rcs + +# [P] optional/unrealircd + +# [R] ia32/syslinux diff --git a/targets/toolchain/include b/targets/toolchain/include new file mode 100644 index 0000000..3a0c879 --- /dev/null +++ b/targets/toolchain/include @@ -0,0 +1,12 @@ +# hdw-linux toolchain target +# +# author: hackbard +# + +# [C] toolchain +# [P] base/00-dirtree + +# [R] ia32/bin86 +# [R] ia32/nasm +# [R] ia32/lilo +# [R] ia32/syslinux -- 2.39.2