Accepting request 235663 from Base:System

- use nologin from upstream (was added in 2.24) 
- remove unknown configure options
- remove unused and outdated suse READMEs
- require bc for checks (forwarded request 235657 from rudi_m)

OBS-URL: https://build.opensuse.org/request/show/235663
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=187
This commit is contained in:
Stephan Kulow 2014-06-02 05:02:19 +00:00 committed by Git OBS Bridge
commit 46f7ce00d3
6 changed files with 11 additions and 206 deletions

View File

@ -1,12 +0,0 @@
Some hints on fdisk and large disks (> 2TB)
-------------------------------------------
Note that fdisk only supports legacy partition tables.
Legacy partition tables (like DOS) use 32 bit LBA addressing,
which means that you can only address partitions with a starting
sector and a size with a maximum of 2**32 sectors = 2TB.
This means you can not create partitions that are greater than 2TB
with fdisk!
If you want to use partition sizes above this limit, you need to use
GUID Partition Tables (GPT) which use 64 bit LBA addressing.
They are supported by parted.

View File

@ -1,54 +0,0 @@
Raw device driver support on SLS 9
On SLS 9, you will notice that by default, raw devices (nodes) (/dev/rawctl
and /dev/raw/rawN (1-15)) no longer exist whereas in SLES 8, the raw nodes were
created when the system was initially installed. SLS 9, by default, uses
the new dynamic userspace implementation "sysfs" together with "udev" which
replaces the previous static "dev" system.
Raw devices are moving towards eventual obsolescence with block+O_DIRECT
support intended as a replacement. The primary application users of raw
character devices have been databases so the database you are using will have
to support the O_DIRECT functionality before moving away from raw character
devices.
Using RAW with kernel 2.6 (SLS 9)
---------------------------------
Raw device usage in kernel 2.6 together with udev and sysfs was intended to be
quite seamless. Basically, all that is required is to load the raw module after
each reboot using the commands "modprobe raw" or "rcraw start". Then use the
"raw" command to create the bindings to the block character devices. The raw
device nodes are no longer required to exist before the bindings are assigned
and used.
Using a single script, you can you load the raw module and bind the raw nodes
to block devices.
#!/usr/bin
# load the raw module
modprobe raw # can also use "rcraw start"
# create the raw bindings
raw /dev/raw/raw1 /dev/sdb1
raw /dev/raw/raw2 /dev/sbc1
You can see if the raw driver is available by issuing "rcraw status". If the
raw driver is loaded, the command should return a status of "running". A status
of "dead" will usually indicate that the driver was not loaded or
the /dev/rawctl file does not exist. The /dev/rawctl file is automatically
created when the module is loaded. This file and the /dev/raw/rawN nodes can
also be viewed under the /sys/class/raw directory.
Raw node permissions
----------------------------------
When the raw devices are assigned, permission settings are determined from the
/etc/udev/udev.permission file. This file can be modified to assign different
owner, group and/or access permissions to the raw nodes. For example, by
default, the permission settings for raw nodes are as follows:
raw/raw*:root:disk:660
Here, root:disk is the default owner:group with read write access for owner and
group. As an example, to create the raw nodes with an owner:group of
user1:group1 and read write access for all, change the assignment as follows:
raw/raw*:user1:group1:666

View File

@ -1,63 +0,0 @@
.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $
.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93
.\"
.Dd February 15, 1997
.Dt NOLOGIN 8
.Os
.Sh NAME
.Nm nologin
.Nd politely refuse a login
.Sh SYNOPSIS
.Nm nologin
.Sh DESCRIPTION
.Nm
displays a message that an account is not available and
exits non-zero.
It is intended as a replacement shell field for accounts that
have been disabled.
.Pp
If the file
.Pa /etc/nologin.txt
exists,
.Nm
displays its contents to the user instead of the default message.
.Sh SEE ALSO
.Xr login 1
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.4 .

View File

@ -1,58 +0,0 @@
/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */
/*
* Copyright (c) 1997, Jason Downs. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
/* Distinctly different from _PATH_NOLOGIN. */
#define _PATH_NOLOGIN_TXT "/etc/nologin.txt"
#define DEFAULT_MESG "This account is currently not available.\n"
/*ARGSUSED*/
int main(argc, argv)
int argc;
char *argv[];
{
int nfd, nrd;
char nbuf[128];
nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY);
if (nfd < 0) {
write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG));
exit (1);
}
while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0)
write(STDOUT_FILENO, nbuf, nrd);
close (nfd);
exit (1);
}

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue May 27 21:17:40 UTC 2014 - sweet_f_a@gmx.de
- use nologin from upstream (was added in 2.24)
- remove unknown configure options
- remove unused and outdated suse READMEs
- require bc for checks
-------------------------------------------------------------------
Fri May 16 15:10:53 UTC 2014 - sweet_f_a@gmx.de

View File

@ -23,6 +23,7 @@
Name: util-linux
BuildRequires: audit-devel
BuildRequires: bc
BuildRequires: binutils-devel
BuildRequires: fdupes
BuildRequires: gettext-devel
@ -67,9 +68,6 @@ License: GPL-2.0+
Group: System/Base
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/%{name}-%{version}.tar.xz
Source1: util-linux-rpmlintrc
# XXX: make nologin part of util-linux upstream
Source2: nologin.c
Source3: nologin.8
Source4: raw.init
Source5: etc.raw
Source6: etc_filesystems
@ -90,8 +88,6 @@ Source28: mkzimage_cmdline.8
Source29: mkzimage_cmdline.c
Source31: addnote.c
#
Source26: README.raw
Source30: README.largedisk
Source50: uuidd.rc
Source51: blkid.conf
##
@ -269,8 +265,6 @@ xzcat %{S:0} | %gpg_verify %{S:12} -
#
# setctsid
cp -p %{S:22} %{S:23} .
# nologin
cp -p %{S:2} %{S:3} %{S:26} %{S:30} .
pushd ../klogconsole
%patch55 -p1
@ -318,8 +312,6 @@ export SUID_LDFLAGS="-pie"
--enable-raw \
--enable-write \
--enable-line \
--enable-new-mount \
--enable-login-utils \
--enable-tunelp \
--enable-socket-activation \
%if %{with enable_last}
@ -327,7 +319,6 @@ export SUID_LDFLAGS="-pie"
%else
--disable-last \
%endif
--enable-logger \
%if %{with enable_eject}
--enable-eject \
%else
@ -355,7 +346,6 @@ export SUID_LDFLAGS="-pie"
#
make %{?_smp_mflags}
#
%{__cc} -fwhole-program %{optflags} -o nologin nologin.c
%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29}
%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31}
@ -388,6 +378,7 @@ popd
# util-linux install
#
%make_install
rm -f %{buildroot}/%{_libdir}/lib*.la
#UsrMerge
%if %{with enable_su}
ln -s %{_bindir}/kill %{buildroot}/bin
@ -414,6 +405,7 @@ ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin
ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin
ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin
ln -s %{_sbindir}/mkswap %{buildroot}/sbin
ln -s %{_sbindir}/nologin %{buildroot}/sbin
ln -s %{_sbindir}/pivot_root %{buildroot}/sbin
ln -s %{_sbindir}/raw %{buildroot}/sbin
ln -s %{_sbindir}/sfdisk %{buildroot}/sbin
@ -430,19 +422,11 @@ ln -s %{_sbindir}/fstrim %{buildroot}/sbin
ln -s %{_sbindir}/chcpu %{buildroot}/sbin
#EndUsrMerge
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems
install -m 755 nologin %{buildroot}/%{_sbindir}
#UsrMerge
ln -s %{_sbindir}/nologin %{buildroot}/sbin
#EndUsrMerge
rm -f %{buildroot}/%{_libdir}/libblkid.la
rm -f %{buildroot}/%{_libdir}/libuuid.la
rm -f %{buildroot}/%{_libdir}/libmount.la
%ifnarch ppc ppc64
install -m 755 mkzimage_cmdline %{buildroot}/%{_bindir}
install -m 644 %{S:28} %{buildroot}%{_mandir}/man8
install -m 755 chrp-addnote %{buildroot}/%{_bindir}
%endif
install -m 644 nologin.8 %{buildroot}%{_mandir}/man8
# setctsid install
install -m 755 setctsid %{buildroot}/%{_sbindir}
install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/