M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions

View File

@ -0,0 +1,223 @@
# MCONFIG -- Configuration stuff for util-linux
# Created: Sat Feb 4 15:50:30 1995
# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
# For a user-mode install, make (at least) three changes:
# - remove the `-o root' part in INSTALLSUID
# - set USE_TTY_GROUP=no
# - define DESTDIR
# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
# Select for CPU i386 if the binaries must be able to run on an intel 386
# (by default i486 code is generated, see below)
CPU=$(shell uname -m)
ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
# will use PAM for authentication. Additionally, passwd will not be
# installed as it is not PAM aware.
HAVE_PAM=no
# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
# and vipw will not be built or installed from the login-utils
# subdirectory.
HAVE_SHADOW=yes
# If HAVE_PASSWD is set to "yes", then passwd will not be built or
# installed from the login-utils subdirectory (but login, chfn, chsh,
# newgrp, and vipw *will* be installed).
HAVE_PASSWD=no
# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
# non-root users to enter the account password before updating /etc/passwd.
REQUIRE_PASSWORD=yes
#REQUIRE_PASSWORD=no
# If you use chsh from this package, ONLY_LISTED_SHELLS will require that
# the selected shell be listed in /etc/shells -- otherwise only a warning is
# printed. This prevents someone from setting their shell to /bin/false.
ONLY_LISTED_SHELLS=yes
#ONLY_LISTED_SHELLS=no
# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
# be built or installed from the login-utils subdirectory. (The shutdown
# and halt that come with the SysVinit package should be used with the init
# found in that package.)
HAVE_SYSVINIT=no
# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
# not be built or installed from the login-utils subdirectory. (The
# shutdown and init from the SysVinit package do not depend on the last,
# mesg, and wall from that package.)
HAVE_SYSVINIT_UTILS=no
# If HAVE_WRITE is set to "yes", then write will not be built or
# installed from the misc-utils subdirectory.
# (There is a network aware write in netwrite from NetKit 0.16 or later.)
HAVE_WRITE=no
# If HAVE_GETTY is set to "yes", then agetty will not be built or
# installed from the login-utils subdirectory. Note that agetty can
# co-exist with other gettys, so this option should never be used.
HAVE_GETTY=no
# If USE_TTY_GROUP is set to "yes", then wall and write will be installed
# setgid to the "tty" group, and mesg will only set the group write bit.
# Note that this is only useful if login/xterm/etc. change the group of the
# user's tty to "tty" [The login in util-linux does this correctly, and
# xterm will do it correctly if X is compiled with USE_TTY_GROUP set
# properly.]
USE_TTY_GROUP=no
# If HAVE_KILL is set to "yes", then kill will not be built or
# installed from the misc-utils subdirectory.
# (There is also a kill in the procps package.)
HAVE_KILL=no
# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
# to the current user, allowing her to make a screendump and do other
# nifty things on the console, but also allowing him to keep an open
# file descriptor after logging out to trick the next user.
ALLOW_VCS_USE=yes
# If HAVE_RESET is set to "yes", then reset won't be installed. The version
# of reset that comes with the ncurses package is less aggressive.
HAVE_RESET=yes
# If HAVE_SLN is set to "yes", then sln won't be installed
# (but the man page sln.8 will be installed anyway).
# sln also comes with libc and glibc.
HAVE_SLN=no
# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
HAVE_FDUTILS=no
# If SILENT_PG is set to "yes", then pg will not ring the bell
# when an invalid key is pressed
SILENT_PG=no
# If configure decides that Native Language Support (NLS) is available,
# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
# DISABLE_NLS to "yes".
DISABLE_NLS=no
# Different optimizations for different cpus.
# gcc 3.0 likes options -mcpu=i486 instead of -m486
ifeq "$(ARCH)" "intel"
ifeq "$(HAVE_OLD_GCC)" "yes"
CPUHEAD=-m
else
CPUHEAD=-mcpu=i
endif
ifeq "$(CPU)" "i386"
CPUTAIL=386
else
CPUTAIL=486
endif
CPUOPT= $(CPUHEAD)$(CPUTAIL)
OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
else
ifeq "$(ARCH)" "arm"
OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
else
OPT= -O2 -fomit-frame-pointer
endif
endif
WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
LIB=../lib
ERR_O=$(LIB)/err.o
# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
# HAVE_SLANG=yes
# There is a subdirectory /usr/include/slang containing slcurses.h
# SLANGFLAGS=-I/usr/include/slang
# No such subdirectory - slcurses.h lives in /usr/include
# (no extra definition required).
LIBSLANG=-lslang
#
# Paths used for compilation (not all are actually used, see CFLAGS below)
#
DEV_DIR= /dev
ETC_DIR= /etc
SBIN_DIR= /sbin
USRSBIN_DIR= /usr/sbin
USRLIB_DIR= /usr/lib
USRBIN_DIR= /usr/bin
USRGAMES_DIR= /usr/games
USRSHAREMISC_DIR=/usr/share/misc
LOCALE_DIR= /usr/share/locale
BIN_DIR= /bin
VAR_PATH= /var
LOG_DIR= /var/log
MAN_DIR= /usr/share/man
INFO_DIR= /usr/share/info
#
# Paths used for install
#
DEVDIR= $(DESTDIR)$(DEV_DIR)
ETCDIR= $(DESTDIR)$(ETC_DIR)
SBINDIR= $(DESTDIR)$(SBIN_DIR)
USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
BINDIR= $(DESTDIR)$(BIN_DIR)
VARPATH= $(DESTDIR)$(VAR_PATH)
LOGDIR= $(DESTDIR)$(LOG_DIR)
MANDIR= $(DESTDIR)$(MAN_DIR)
MAN1DIR= $(MANDIR)/man1
MAN3DIR= $(MANDIR)/man3
MAN5DIR= $(MANDIR)/man5
MAN6DIR= $(MANDIR)/man6
MAN8DIR= $(MANDIR)/man8
INFODIR= $(DESTDIR)$(INFO_DIR)
# Directory for shutdown, halt, reboot, etc.
SHUTDOWNDIR= $(SBINDIR)
# Modes
DIRMODE= 755
BINMODE= 755
MANMODE= 644
DATMODE= 644
INFOMODE= 644
SUIDMODE= 4755
CHMOD= chmod
INSTALL= install
INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
INSTALLBIN= $(INSTALL) -m $(BINMODE)
INSTALLMAN= $(INSTALL) -m $(MANMODE)
INSTALLDAT= $(INSTALL) -m $(DATMODE)
INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
ifeq "$(DISABLE_NLS)" "yes"
NLSFLAGS = -DDISABLE_NLS
endif
CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
$(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
-D_FILE_OFFSET_BITS=64 \
-DSBINDIR=\"$(SBIN_DIR)\" \
-DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
-DLOGDIR=\"$(LOG_DIR)\" \
-DVARPATH=\"$(VAR_PATH)\" \
-DLOCALEDIR=\"$(LOCALE_DIR)\" \
$(CFLAGS)
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
%: %.cc
$(CXX) $(CFLAGS) $< -o $@

View File

@ -0,0 +1,10 @@
#define UTIL_LINUX_VERSION "2.12"
#define util_linux_version "util-linux-2.12"
#define HAVE_blkpg_h
#define HAVE_kd_h
#define HAVE_locale_h
#define HAVE_langinfo_h
#define HAVE_sys_user_h
#define HAVE_asm_types_h
//#define NEED_tqueue_h

View File

@ -0,0 +1,17 @@
VERSION=2.12
CC=gcc
CFLAGS=
LDFLAGS=
HAVE_OLD_GCC=yes
HAVE_RAW_H=yes
HAVE_NCURSES=yes
CURSESFLAGS=-DNCH=1
LIBCURSES=-lncurses
HAVE_TERMCAP=no
NEED_LIBCRYPT=yes
FOREIGN = --foreign-user
HAVE_XGETTEXT=yes
HAVE_OPENPTY=yes
HAVE_PIVOT_ROOT=yes
HAVE_GOOD_RPC=yes
HAVE_ZLIB=yes

View File

@ -0,0 +1,25 @@
Upstream-Status: Inappropriate [distribution]
Take out lscpu stuff from the code
2011/03/17
Saul Wold <saul.wold@intel.com>
Nitin A Kamble <nitin.a.kamble@intel.com>
Index: util-linux-2.20.1/sys-utils/Makefile.am
===================================================================
--- util-linux-2.20.1.orig/sys-utils/Makefile.am
+++ util-linux-2.20.1/sys-utils/Makefile.am
@@ -17,12 +17,6 @@ usrsbin_exec_PROGRAMS += ldattach tunelp
dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
ldattach.8 tunelp.8 rtcwake.8 fsfreeze.8 fstrim.8
-if HAVE_CPU_SET_T
-usrbin_exec_PROGRAMS += lscpu
-lscpu_SOURCES = lscpu.c $(top_srcdir)/lib/cpuset.c $(top_srcdir)/lib/strutils.c
-dist_man_MANS += lscpu.1
-endif
-
endif
cytune_SOURCES = cytune.c cyclades.h

View File

@ -0,0 +1,35 @@
simpleinit: remove deprecated sigsetmask()
The sigsetmask() is deprecated in favor of sigprocmask().
This is not needed upstream since simpleinit is removed from
util-linux-ng master
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate
Index: util-linux-2.19.1/simpleinit/shutdown.c
===================================================================
--- util-linux-2.19.1.orig/simpleinit/shutdown.c 2011-03-04 03:47:47.000000000 -0800
+++ util-linux-2.19.1/simpleinit/shutdown.c 2011-07-06 08:43:39.183849752 -0700
@@ -145,7 +145,7 @@
{
int c, i, fd;
char *ptr;
-
+ sigset_t sigmask;
i = getdtablesize ();
for (fd = 3; fd < i; fd++) close (fd);
if (getpid () == 1)
@@ -153,7 +153,9 @@
for (fd = 0; fd < 3; fd++) close (fd);
while (1) wait (NULL); /* Grim reaper never stops */
}
- sigsetmask (0); /* simpleinit(8) blocks all signals: undo for ALRM */
+ /* simpleinit(8) blocks all signals: undo for ALRM */
+ sigemptyset(&sigmask);
+ sigprocmask (SIG_SETMASK, &sigmask, NULL);
for (i = 1; i < NSIG; i++) signal (i, SIG_DFL);
setlocale(LC_ALL, "");

View File

@ -0,0 +1,3 @@
#define SWAPON_HAS_TWO_ARGS
#include <asm/page.h>
#include <sys/swap.h>

View File

@ -0,0 +1,31 @@
configure should include errno.h instead of argp.h when
checking for presence of program_invocation_short_name
uclibc defines this to be const char* unlike util-linux-ng
which defines this to be char* so this error goes unnoticed
on glibc/eglibc systems.
here is the error it fixes
in file included from mountP.h:14:0,
from cache.c:29:
/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname'
../../../include/c.h:118:14: note: previous declaration of '__progname' was here
make[3]: *** [cache.lo] Error 1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
Index: util-linux-2.19.1/configure.ac
===================================================================
--- util-linux-2.19.1.orig/configure.ac
+++ util-linux-2.19.1/configure.ac
@@ -250,7 +250,7 @@ esac
AC_MSG_CHECKING(whether program_invocation_short_name is defined)
-AC_TRY_COMPILE([#include <argp.h>],
+AC_TRY_COMPILE([#include <errno.h>],
[program_invocation_short_name = "test";],
AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
[Define if program_invocation_short_name is defined])

View File

@ -0,0 +1,15 @@
Upstream-Status: Inappropriate [embedded specific]
Index: util-linux-ng-2.16/misc-utils/cal.c
===================================================================
--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700
+++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700
@@ -407,7 +407,7 @@
strcpy(day_headings,"");
strcpy(j_day_headings,"");
-#ifdef HAVE_LANGINFO_H
+#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__)
# define weekday(wd) nl_langinfo(ABDAY_1+wd)
#else
# define weekday(wd) _time_info->abbrev_wkday[wd]

View File

@ -0,0 +1,27 @@
Upstream-Status: Inappropriate [embedded specific]
The FHS indicates that /etc must be capable of being mounted R/O.
The FHS also indicates that lock files belong in /var/lock, and /var must
be R/W as soon as possible during boot.
This patch moves the mtab lock file from the potentially R/O /etc, to the
R/W /var/lock area. This lock file is used when mounting disks and making
other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing
to write to this file does not cause any functional limitations.
(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
--- util-linux-ng-2.16/include/pathnames.h.orig
+++ util-linux-ng-2.16/include/pathnames.h
@@ -90,7 +90,7 @@
# endif
#endif
-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
+#define _PATH_MOUNTED_LOCK "/var/lock/mtab~"
#define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
#ifndef _PATH_DEV

View File

@ -0,0 +1,25 @@
Upstream-Status: Pending
Index: util-linux-ng-2.14/login-utils/login.c
===================================================================
--- util-linux-ng-2.14.orig/login-utils/login.c 2008-05-28 16:01:02.000000000 -0700
+++ util-linux-ng-2.14/login-utils/login.c 2009-03-04 18:31:42.000000000 -0800
@@ -358,6 +358,7 @@
char *childArgv[10];
char *buff;
int childArgc = 0;
+ struct sigaction act;
#ifdef HAVE_SECURITY_PAM_MISC_H
int retcode;
pam_handle_t *pamh = NULL;
@@ -373,7 +374,9 @@
pid = getpid();
signal(SIGALRM, timedout);
- siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */
+ (void) sigaction(SIGALRM, NULL, &act);
+ act.sa_flags &= ~SA_RESTART;
+ sigaction(SIGALRM, &act, NULL);
alarm((unsigned int)timeout);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);

View File

@ -0,0 +1,299 @@
SUMMARY = "A suite of basic system administration utilities."
DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
commonly found on most Linux systems. Some of the more important utilities include \
disk partitioning, kernel message management, filesystem creation, and system login."
SECTION = "base"
LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
LIC_FILES_CHKSUM = "file://README.licensing;md5=9c920d811858a74b67a36ba23cbaa95f \
file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://licenses/COPYING.GPL;md5=8ca43cbc842c2336e835926c2166c28b \
file://licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \
file://getopt/COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
inherit autotools gettext pkgconfig
DEPENDS = "zlib ncurses"
DEPENDS_virtclass-native = " lzo-native"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.bz2 \
file://MCONFIG \
file://swapargs.h \
file://defines.h \
file://make_include \
"
PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
util-linux-swaponoff util-linux-losetup util-linux-umount \
util-linux-mount util-linux-readprofile util-linux-libblkid \
util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
util-linux-chkdupexe util-linux-mkfs util-linux-mcookie"
EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
--disable-makeinstall-chown --enable-elvtune --enable-init \
--enable-kill --enable-last --enable-mesg --enable-partx \
--enable-raw --enable-rdev --enable-reset --disable-login-utils \
--enable-write --enable-arch --enable-mount --with-fsprobe=builtin \
--enable-libuuid --enable-libblkid --enable-fsck"
FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
FILES_util-linux-agetty = "${base_sbindir}/agetty"
FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${PN}"
FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk"
FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${PN} ${sbindir}/swapoff.${PN}"
FILES_util-linux-losetup = "${base_sbindir}/losetup.${PN}"
FILES_util-linux-mount = "${base_bindir}/mount.${PN}"
FILES_util-linux-mcookie = "${bindir}/mcookie"
FILES_util-linux-umount = "${base_bindir}/umount.${PN}"
FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${PN}"
FILES_util-linux-uuidgen = "${bindir}/uuidgen"
FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*"
FILES_util-linux-libblkid-dev = "${base_libdir}/libblkid.so ${base_libdir}/libblkid.a ${base_libdir}/libblkid.la ${includedir}/blkid ${libdir}/pkgconfig/blkid.pc"
FILES_util-linux-libuuid = "${base_libdir}/libuuid.so.*"
FILES_util-linux-libuuid-dev = "${base_libdir}/libuuid.so ${base_libdir}/libuuid.a ${base_libdir}/libuuid.la ${includedir}/uuid ${libdir}/pkgconfig/uuid.pc"
FILES_util-linux-lscpu = "${bindir}/lscpu"
FILES_util-linux-fsck = "${base_sbindir}/fsck*"
FILES_util-linux-chkdupexe = "${bindir}/chkdupexe"
FILES_util-linux-mkfs = "${sbindir}/mkfs"
# Util-linux' blkid replaces the e2fsprogs one
FILES_util-linux-blkid = "${base_sbindir}/blkid*"
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
RDEPENDS_${PN}-chkdupexe = "perl"
RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs "
RRECOMMENDS_${PN}_virtclass-native = ""
RDEPENDS_${PN}_virtclass-native = ""
do_compile () {
set -e
install ${WORKDIR}/MCONFIG ${S}/MCONFIG
install ${WORKDIR}/make_include ${S}/make_include
install ${WORKDIR}/swapargs.h ${S}/mount/swapargs.h
install ${WORKDIR}/defines.h ${S}/defines.h
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
}
checklink() {
local targ link value
targ="$1"
link="$2"
ext="$3"
if test -h "$link"
then
value="$(readlink "$link")"
if test "$value" = "$targ"
then
rm "$link"
ln -s "$targ"."${PN}" "$link$ext"
return 0
else
echo "$link: '$value' found '$targ' expected" >&2
return 1
fi
else
echo "$link: not a symbolic link" >&2
return 1
fi
}
do_install () {
# with ccache the timestamps on compiled files may
# end up earlier than on their inputs, this allows
# for the resultant compilation in the install step.
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
mkdir -p ${D}${base_bindir}
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid sln blockdev"
usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt flock"
binprogs_a="dmesg kill more umount mount login reset"
if [ "${base_sbindir}" != "${sbindir}" ]; then
mkdir -p ${D}${base_sbindir}
for p in $sbinprogs $sbinprogs_a; do
if [ -f "${D}${sbindir}/$p" ]; then
mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
fi
done
fi
if [ "${base_bindir}" != "${bindir}" ]; then
mkdir -p ${D}${base_bindir}
for p in $binprogs_a; do
if [ -f "${D}${bindir}/$p" ]; then
mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
fi
done
fi
for p in $usrbinprogs_a; do
if [ -f "${D}${bindir}/$p" ]; then
mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
fi
done
for p in $binprogs_a; do
if [ -f "${D}${base_bindir}/$p" ]; then
mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
fi
done
for p in $sbinprogs_a; do
if [ -f "${D}${base_sbindir}/$p" ]; then
mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}"
fi
done
install -d ${D}${sysconfdir}/default/
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
# note ${PN} in swapon.${PN}, swapon is an alternative link that is
# not guaranteed to provide multiple functions, similar for shutdown
ln -sf swapon.${PN} ${D}${base_sbindir}/swapoff.${PN}
ln -sf shutdown.${PN} ${D}${base_sbindir}/reboot.${PN}
ln -sf shutdown.${PN} ${D}${base_sbindir}/halt.${PN}
ln -sf shutdown.${PN} ${D}${base_sbindir}/fastboot
ln -sf shutdown.${PN} ${D}${base_sbindir}/fasthalt
rm -f ${D}${sbindir}/halt
rm -f ${D}${sbindir}/reboot
rm -f ${D}${sbindir}/fastboot
rm -f ${D}${sbindir}/fasthalt
rm -f ${D}${sbindir}/swapoff
}
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/dmesg dmesg dmesg.${PN} 100
update-alternatives --install ${base_bindir}/kill kill kill.${PN} 100
update-alternatives --install ${base_bindir}/more more more.${PN} 100
update-alternatives --install ${base_sbindir}/mkswap mkswap mkswap.${PN} 100
update-alternatives --install ${base_sbindir}/blockdev blockdev blockdev.${PN} 100
test -x ${base_sbindir}/pivot_root.${PN} && \
update-alternatives --install ${base_sbindir}/pivot_root pivot_root pivot_root.${PN} 100
# update-alternatives --install ${base_sbindir}/sln sln sln.${PN} 100
update-alternatives --install ${base_sbindir}/mkfs.minix mkfs.minix mkfs.minix.${PN} 100
update-alternatives --install ${bindir}/hexdump hexdump hexdump.${PN} 100
update-alternatives --install ${bindir}/last last last.${PN} 100
update-alternatives --install ${bindir}/logger logger logger.${PN} 100
update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 100
update-alternatives --install ${bindir}/renice renice renice.${PN} 100
update-alternatives --install ${bindir}/wall wall wall.${PN} 100
update-alternatives --install ${bindir}/setsid setsid setsid.${PN} 100
update-alternatives --install ${bindir}/chrt chrt chrt.${PN} 100
update-alternatives --install ${bindir}/flock flock flock.${PN} 100
# There seems to be problem, atleast on nslu2, with these, untill they are
# fixed the busybox ones have higher priority
update-alternatives --install ${base_sbindir}/hwclock hwclock hwclock.${PN} 10
update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 10
update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 10
update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 10
}
pkg_prerm_${PN} () {
test -x ${base_sbindir}/pivot_root.${PN} && \
update-alternatives --remove pivot_root pivot_root.${PN}
update-alternatives --remove dmesg dmesg.${PN}
update-alternatives --remove kill kill.${PN}
update-alternatives --remove more more.${PN}
update-alternatives --remove halt halt.${PN}
update-alternatives --remove hwclock hwclock.${PN}
update-alternatives --remove mkswap mkswap.${PN}
update-alternatives --remove blockdev blockdev.${PN}
update-alternatives --remove reboot reboot.${PN}
update-alternatives --remove shutdown shutdown.${PN}
# update-alternatives --remove sln sln.${PN}
update-alternatives --remove mkfs.minix mkfs.minix.${PN}
update-alternatives --remove hexdump hexdump.${PN}
update-alternatives --remove last last.${PN}
update-alternatives --remove logger logger.${PN}
update-alternatives --remove mesg mesg.${PN}
update-alternatives --remove renice renice.${PN}
update-alternatives --remove wall wall.${PN}
update-alternatives --remove setsid setsid.${PN}
update-alternatives --remove chrt chrt.${PN}
update-alternatives --remove flock flock.${PN}
}
pkg_postinst_util-linux-fdisk () {
update-alternatives --install ${base_sbindir}/fdisk fdisk fdisk.${PN} 100
}
pkg_prerm_util-linux-fdisk () {
update-alternatives --remove fdisk fdisk.${PN}
}
pkg_postinst_util-linux-agetty () {
update-alternatives --install ${base_sbindir}/getty getty agetty 100
}
pkg_prerm_util-linux-agetty () {
update-alternatives --remove getty agetty
}
pkg_postinst_util-linux-mount () {
update-alternatives --install ${base_bindir}/mount mount mount.${PN} 100
}
pkg_prerm_util-linux-mount () {
update-alternatives --remove mount mount.${PN}
}
pkg_postinst_util-linux-umount () {
update-alternatives --install ${base_bindir}/umount umount umount.${PN} 100
}
pkg_prerm_util-linux-umount () {
update-alternatives --remove umount umount.${PN}
}
pkg_postinst_util-linux-losetup () {
update-alternatives --install ${base_sbindir}/losetup losetup losetup.${PN} 100
}
pkg_prerm_util-linux-losetup () {
update-alternatives --remove losetup losetup.${PN}
}
pkg_postinst_util-linux-swaponoff () {
update-alternatives --install ${base_sbindir}/swapoff swapoff swapoff.${PN} 100
update-alternatives --install ${base_sbindir}/swapon swapon swapon.${PN} 100
}
pkg_prerm_util-linux-swaponoff () {
update-alternatives --remove swapoff swapoff.${PN}
update-alternatives --remove swapon swapon.${PN}
}
pkg_postinst_util-linux-fsck () {
update-alternatives --install ${base_sbindir}/fsck.minix fsck.minix fsck.minix.${PN} 100
update-alternatives --install ${base_sbindir}/fsck fsck fsck.${PN} 100
}
pkg_prerm_util-linux-fsck () {
update-alternatives --remove fsck.minix fsck.minix.${PN}
update-alternatives --remove fsck fsck.${PN}
}
pkg_postinst_util-linux-blkid () {
update-alternatives --install ${base_sbindir}/blkid blkid blkid.${PN} 100
}
pkg_prerm_util-linux-blkid () {
update-alternatives --remove blkid blkid.${PN}
}
BBCLASSEXTEND = "native"

View File

@ -0,0 +1,47 @@
MAJOR_VERSION = "2.20"
PR = "r2"
require util-linux.inc
# note that `lscpu' is under GPLv3+
LICENSE_util-linux-lscpu = "GPLv3+"
SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
file://util-linux-ng-2.16-mount_lock_path.patch \
file://uclibc-__progname-conflict.patch \
"
SRC_URI[md5sum] = "079b37517fd4e002a2e6e992e8b4e361"
SRC_URI[sha256sum] = "d16ebcda3e64ab88ed363d9c1242cdb7ccfd5e1f56c83d0c3b0638c23793bbe0"
# Only lscpu part is gplv3; rest of the code is not,
# so take out the lscpu parts while running non-gplv3 build.
python () {
d.setVar("REMOVELSCPU", "no")
if (d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1:
# avoid GPLv3
d.setVar("REMOVELSCPU", "yes")
packages = (d.getVar("PACKAGES", False) or "").split()
if "util-linux-lscpu" in packages:
packages.remove("util-linux-lscpu")
d.setVar("PACKAGES", " ".join(packages))
src_uri = (d.getVar("SRC_URI", False) or "").split()
src_uri.append("file://remove-lscpu.patch")
d.setVar("SRC_URI", " ".join(src_uri))
}
do_remove_lscpu() {
if [ "x${REMOVELSCPU}" = "xyes" ]; then
rm -f sys-utils/lscpu.c sys-utils/lscpu.1
rm -rf tests/ts/lscpu tests/expected/lscpu
fi
}
addtask remove_lscpu before do_configure after do_patch
CACHED_CONFIGUREVARS += "scanf_cv_type_modifier=as"
EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group"
do_install_append () {
sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/chkdupexe
}