From d195142d121603159e1091d35331bee99b4b1fa8 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Mon, 12 May 2008 09:55:56 +0000 Subject: [PATCH] Stefan Fiedler: add util-linux-ng CORE package util-linux-ng: use same install paths as util-linux util-linux: remove CORE flag e2fsprogs: always built in stage 2 (for util-linux-ng) 2nd-stage, target/bootdisk, misc/pkgsel: use util-linux-ng instead of util-linux [2008020214515321154] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8994 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- misc/pkgsel/sets/basic.set | 2 +- package/base/e2fsprogs/e2fsprogs.desc | 2 +- package/base/util-linux-ng/etc_fdprm.txt | 28 ++++++++++ package/base/util-linux-ng/freeramdisk.c | 33 ++++++++++++ package/base/util-linux-ng/util-linux-ng.conf | 52 +++++++++++++++++++ package/base/util-linux-ng/util-linux-ng.desc | 49 +++++++++++++++++ package/base/util-linux/util-linux.desc | 1 - target/bootdisk/config.in | 2 +- 8 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 package/base/util-linux-ng/etc_fdprm.txt create mode 100644 package/base/util-linux-ng/freeramdisk.c create mode 100644 package/base/util-linux-ng/util-linux-ng.conf create mode 100644 package/base/util-linux-ng/util-linux-ng.desc diff --git a/misc/pkgsel/sets/basic.set b/misc/pkgsel/sets/basic.set index 6cb0413d0..5b6644eb2 100644 --- a/misc/pkgsel/sets/basic.set +++ b/misc/pkgsel/sets/basic.set @@ -72,7 +72,7 @@ / e2fsprogs / { p; d; } / file / { p; d; } / mine / { p; d; } -/ util-linux / { p; d; } +/ util-linux-ng / { p; d; } / iproute2 / { p; d; } / net-tools / { p; d; } / module-init-tools / { p; d; } diff --git a/package/base/e2fsprogs/e2fsprogs.desc b/package/base/e2fsprogs/e2fsprogs.desc index 08ea8e9f9..e85b1c5c1 100644 --- a/package/base/e2fsprogs/e2fsprogs.desc +++ b/package/base/e2fsprogs/e2fsprogs.desc @@ -39,7 +39,7 @@ [L] GPL LGPL [S] Stable [V] 1.40.2 -[P] X --X--5---9 101.200 +[P] X --2--5---9 101.200 [D] 3814447537 e2fsprogs-1.40.2.tar.gz http://download.sourceforge.net/e2fsprogs/ diff --git a/package/base/util-linux-ng/etc_fdprm.txt b/package/base/util-linux-ng/etc_fdprm.txt new file mode 100644 index 000000000..a9282e1e6 --- /dev/null +++ b/package/base/util-linux-ng/etc_fdprm.txt @@ -0,0 +1,28 @@ +# /etc/fdprm - floppy disk parameter table + +# Common disk formats. Names are of the form +# actual media capacity/maximum drive capacity +# (Note: although 5.25" HD drives can format disks at 1.44M, they're listed +# as 1200 because that's the common maximum size.) + +# size sec/t hds trk stre gap rate spec1 fmt_gap +360/360 720 9 2 40 0 0x2A 0x02 0xDF 0x50 +1200/1200 2400 15 2 80 0 0x1B 0x00 0xDF 0x54 +360/720 720 9 2 40 1 0x2A 0x02 0xDF 0x50 +720/720 1440 9 2 80 0 0x2A 0x02 0xDF 0x50 +720/1440 1440 9 2 80 0 0x2A 0x02 0xDF 0x50 +360/1200 720 9 2 40 1 0x23 0x01 0xDF 0x50 +720/1200 1440 9 2 80 0 0x23 0x01 0xDF 0x50 +1440/1440 2880 18 2 80 0 0x1B 0x00 0xCF 0x6C + +# Non-standard disk formats: + +# BEWARE: They're incomplete and possibly incorrect. The only reason why +# they are in this file is to show how such formats are added. + +1440/1200 2880 18 2 80 0 ???? ???? ???? ???? # ????? +1680/1440 3360 21 2 80 0 0x0C 0x00 0xCF 0x6C # ????? + +# Add user-specific formats here +cbm1581 1600 10 2 80 2 0x2A 0x02 0xDF 0x2E +800/720 1600 10 2 80 0 0x2A 0x02 0xDF 0x2E diff --git a/package/base/util-linux-ng/freeramdisk.c b/package/base/util-linux-ng/freeramdisk.c new file mode 100644 index 000000000..8ce355f76 --- /dev/null +++ b/package/base/util-linux-ng/freeramdisk.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int c, f, rc=0; + + if (argc == 1) { + fprintf(stderr,"Usage: %s /dev/rd/initrd " + "[ /dev/rd/12 [ .. ] ]\n", argv[0]); + return 1; + } + + for (c=1; c < argc; c++) { + if ((f=open(argv[c], O_RDWR)) == -1) { + fprintf(stderr, "freeramdisk: cannot open %s: %s\n", + argv[c], strerror(errno)); + rc++; + } else { + ioctl(f, BLKFLSBUF); + close(f); + } + } + return rc; +} + diff --git a/package/base/util-linux-ng/util-linux-ng.conf b/package/base/util-linux-ng/util-linux-ng.conf new file mode 100644 index 000000000..c55b89ca5 --- /dev/null +++ b/package/base/util-linux-ng/util-linux-ng.conf @@ -0,0 +1,52 @@ +#!/bin/bash +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/base/util-linux/util-linux.conf +# ROCK Linux is Copyright (C) 1998 - 2006 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 --- + +hook_add premake 5 "cp hwclock/hwclock.c{,.orig}; \ + sed 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ + hwclock/hwclock.c.orig > hwclock/hwclock.c; \ + mkdir -pv ${CLFS}/var/lib/hwclock" + +# The following options make this package compatible to util-linux +# wrt. available programs and installation paths. +var_append extraconfopt ' ' '--enable-arch' +var_append extraconfopt ' ' '--enable-partx' +var_append extraconfopt ' ' '--enable-raw' +var_append extraconfopt ' ' '--enable-rdev' +var_append extraconfopt ' ' '--enable-write' +var_append extraconfopt ' ' '--disable-wall' + +var_append INSTALL_WRAPPER_FILTER '|' 'sed -e"s,/usr/bin/\(arch\|dmesg\|more\|mount\|umount\),/bin/\1," -e"s,/usr/sbin/\(addpart\|agetty\|blockdev\|cfdisk\|ctrlaltdel\|delpart\|fdisk\|fsck.cramfs\|fsck.minix\|hwclock\|losetup\|mkfs\|mkfs.bfs\|mkfs.cramfs\|mkfs.minix\|mkswap\|partx\|pivot_root\|raw\|sfdisk\|swapoff\|swapon\),/sbin/\1,"' + +# The following programs are no longer available in util-linux-ng: +# sbin/elvtune +postmake="util_linux_postmake" +util_linux_postmake() { + $CC $confdir/freeramdisk.c -o $root/sbin/freeramdisk + + ln -svf scriptreplay.1 $mandir/man1/replay.1 + ln -svf scriptreplay $bindir/replay + + if [ ! -e $root/etc/fdprm ] ; then + cp -a $confdir/etc_fdprm.txt $root/etc/fdprm + fi +} diff --git a/package/base/util-linux-ng/util-linux-ng.desc b/package/base/util-linux-ng/util-linux-ng.desc new file mode 100644 index 000000000..e11536ca6 --- /dev/null +++ b/package/base/util-linux-ng/util-linux-ng.desc @@ -0,0 +1,49 @@ + +[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- +[COPY] +[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. +[COPY] Please add additional copyright information _after_ the line containing +[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +[COPY] +[COPY] ROCK Linux: rock-src/package/base/util-linux/util-linux.desc +[COPY] ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf +[COPY] +[COPY] This program is free software; you can redistribute it and/or modify +[COPY] it under the terms of the GNU General Public License as published by +[COPY] the Free Software Foundation; either version 2 of the License, or +[COPY] (at your option) any later version. A copy of the GNU General Public +[COPY] License can be found at Documentation/COPYING. +[COPY] +[COPY] Many people helped and are helping developing ROCK Linux. Please +[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM +[COPY] file for details. +[COPY] +[COPY] --- ROCK-COPYRIGHT-NOTE-END --- + +[I] Miscellaneous system utilities for Linux. + +[T] The util-linux package contains a large variety of low-level +[T] system utilities that are necessary for a Linux system to +[T] function. Among many features, Util-linux contains the fdisk +[T] configuration tool and the login program. + +[T] The util-linux-ng is a fork of the original util-linux project. The goal of +[T] the util-linux-ng is a transparent and reliable development that follows +[T] the Linux kernel and Linux distributions. + +[U] http://userweb.kernel.org/~kzak/util-linux-ng/ + +[A] many { see AUTHORS file } +[M] The ROCK Linux Project + +[C] base/system +[F] CORE + +[L] GPL +[S] Stable +[V] 2.13.1 +[P] X --2--5---9 102.600 + +[D] 3976865979 util-linux-ng-2.13.1.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/ + diff --git a/package/base/util-linux/util-linux.desc b/package/base/util-linux/util-linux.desc index d518d78a5..6549484ac 100644 --- a/package/base/util-linux/util-linux.desc +++ b/package/base/util-linux/util-linux.desc @@ -36,7 +36,6 @@ [C] base/system [F] DIETLIBC -[F] CORE [L] GPL [S] Stable diff --git a/target/bootdisk/config.in b/target/bootdisk/config.in index 3235e55c5..3ee9986f1 100644 --- a/target/bootdisk/config.in +++ b/target/bootdisk/config.in @@ -69,7 +69,7 @@ pkgfilter sed ' / tar / { p ; d ; } ; / tcpdump / { p ; d ; } ; / tcp_wrappers / { p ; d ; } ; / texinfo / { p ; d ; } ; / time / { p ; d ; } ; / udev / { p ; d ; } ; -/ uml_utilities / { p ; d ; } ; / util-linux / { p ; d ; } ; +/ uml_utilities / { p ; d ; } ; / util-linux-ng / { p ; d ; } ; / wget / { p ; d ; } ; / xfsprogs / { p ; d ; } ; / zlib / { p ; d ; } ;