forked from pool/coreutils
Accepting request 177954 from home:bernhard-voelker:branches:Base:System
Remove su(1) and kill(1) - both are provided by util-linux now. OBS-URL: https://build.opensuse.org/request/show/177954 OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=195
This commit is contained in:
parent
83be651505
commit
b8beefb76d
122
coreutils-remove_kill_documentation.patch
Normal file
122
coreutils-remove_kill_documentation.patch
Normal file
@ -0,0 +1,122 @@
|
||||
Index: doc/coreutils.texi
|
||||
===================================================================
|
||||
--- doc/coreutils.texi.orig
|
||||
+++ doc/coreutils.texi
|
||||
@@ -69,7 +69,6 @@
|
||||
* id: (coreutils)id invocation. Print user identity.
|
||||
* install: (coreutils)install invocation. Copy and change attributes.
|
||||
* join: (coreutils)join invocation. Join lines on a common field.
|
||||
-* kill: (coreutils)kill invocation. Send a signal to processes.
|
||||
* link: (coreutils)link invocation. Make hard links between files.
|
||||
* ln: (coreutils)ln invocation. Make links between files.
|
||||
* logname: (coreutils)logname invocation. Print current login name.
|
||||
@@ -200,7 +199,6 @@ Free Documentation License''.
|
||||
* System context:: date arch nproc uname hostid uptime
|
||||
* SELinux context:: chcon runcon
|
||||
* Modified command invocation:: chroot env nice nohup stdbuf timeout
|
||||
-* Process control:: kill
|
||||
* Delaying:: sleep
|
||||
* Numeric operations:: factor seq
|
||||
* File permissions:: Access modes
|
||||
@@ -446,10 +444,6 @@ Modified command invocation
|
||||
* stdbuf invocation:: Run a command with modified I/O buffering
|
||||
* timeout invocation:: Run a command with a time limit
|
||||
|
||||
-Process control
|
||||
-
|
||||
-* kill invocation:: Sending a signal to processes.
|
||||
-
|
||||
Delaying
|
||||
|
||||
* sleep invocation:: Delay for a specified time
|
||||
@@ -16380,90 +16374,6 @@ the exit status of @var{command} otherwi
|
||||
@end display
|
||||
|
||||
|
||||
-@node Process control
|
||||
-@chapter Process control
|
||||
-
|
||||
-@cindex processes, commands for controlling
|
||||
-@cindex commands for controlling processes
|
||||
-
|
||||
-@menu
|
||||
-* kill invocation:: Sending a signal to processes.
|
||||
-@end menu
|
||||
-
|
||||
-
|
||||
-@node kill invocation
|
||||
-@section @command{kill}: Send a signal to processes
|
||||
-
|
||||
-@pindex kill
|
||||
-@cindex send a signal to processes
|
||||
-
|
||||
-The @command{kill} command sends a signal to processes, causing them
|
||||
-to terminate or otherwise act upon receiving the signal in some way.
|
||||
-Alternatively, it lists information about signals. Synopses:
|
||||
-
|
||||
-@example
|
||||
-kill [-s @var{signal} | --signal @var{signal} | -@var{signal}] @var{pid}@dots{}
|
||||
-kill [-l | --list | -t | --table] [@var{signal}]@dots{}
|
||||
-@end example
|
||||
-
|
||||
-@mayConflictWithShellBuiltIn{kill}
|
||||
-
|
||||
-The first form of the @command{kill} command sends a signal to all
|
||||
-@var{pid} arguments. The default signal to send if none is specified
|
||||
-is @samp{TERM}@. The special signal number @samp{0} does not denote a
|
||||
-valid signal, but can be used to test whether the @var{pid} arguments
|
||||
-specify processes to which a signal could be sent.
|
||||
-
|
||||
-If @var{pid} is positive, the signal is sent to the process with the
|
||||
-process ID @var{pid}. If @var{pid} is zero, the signal is sent to all
|
||||
-processes in the process group of the current process. If @var{pid}
|
||||
-is @minus{}1, the signal is sent to all processes for which the user has
|
||||
-permission to send a signal. If @var{pid} is less than @minus{}1, the signal
|
||||
-is sent to all processes in the process group that equals the absolute
|
||||
-value of @var{pid}.
|
||||
-
|
||||
-If @var{pid} is not positive, a system-dependent set of system
|
||||
-processes is excluded from the list of processes to which the signal
|
||||
-is sent.
|
||||
-
|
||||
-If a negative @var{pid} argument is desired as the first one, it
|
||||
-should be preceded by @option{--}. However, as a common extension to
|
||||
-POSIX, @option{--} is not required with @samp{kill
|
||||
--@var{signal} -@var{pid}}. The following commands are equivalent:
|
||||
-
|
||||
-@example
|
||||
-kill -15 -1
|
||||
-kill -TERM -1
|
||||
-kill -s TERM -- -1
|
||||
-kill -- -1
|
||||
-@end example
|
||||
-
|
||||
-The first form of the @command{kill} command succeeds if every @var{pid}
|
||||
-argument specifies at least one process that the signal was sent to.
|
||||
-
|
||||
-The second form of the @command{kill} command lists signal information.
|
||||
-Either the @option{-l} or @option{--list} option, or the @option{-t}
|
||||
-or @option{--table} option must be specified. Without any
|
||||
-@var{signal} argument, all supported signals are listed. The output
|
||||
-of @option{-l} or @option{--list} is a list of the signal names, one
|
||||
-per line; if @var{signal} is already a name, the signal number is
|
||||
-printed instead. The output of @option{-t} or @option{--table} is a
|
||||
-table of signal numbers, names, and descriptions. This form of the
|
||||
-@command{kill} command succeeds if all @var{signal} arguments are valid
|
||||
-and if there is no output error.
|
||||
-
|
||||
-The @command{kill} command also supports the @option{--help} and
|
||||
-@option{--version} options. @xref{Common options}.
|
||||
-
|
||||
-A @var{signal} may be a signal name like @samp{HUP}, or a signal
|
||||
-number like @samp{1}, or an exit status of a process terminated by the
|
||||
-signal. A signal name can be given in canonical form or prefixed by
|
||||
-@samp{SIG}@. The case of the letters is ignored, except for the
|
||||
-@option{-@var{signal}} option which must use upper case to avoid
|
||||
-ambiguity with lower case option letters.
|
||||
-@xref{Signal specifications}, for a list of supported
|
||||
-signal names and numbers.
|
||||
-
|
||||
@node Delaying
|
||||
@chapter Delaying
|
||||
|
1664
coreutils-su.patch
1664
coreutils-su.patch
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 7 01:50:04 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
- Remove su(1) and kill(1) - both are provided by util-linux now.
|
||||
* su.pamd, su.default, coreutils-su.patch: Remove patch and PAM
|
||||
config files related to su(1).
|
||||
* coreutils-remove_kill_documentation.patch: Add patch to remove
|
||||
kill from the texinfo manual.
|
||||
* coreutils.spec: Remove above, su-related patch and sources.
|
||||
Remove Requires:pam and BuildRequires:pam-devel.
|
||||
Remove Provides:/bin/{su,kill}.
|
||||
Remove paragraph mentioning su(1) and kill(1) in %description.
|
||||
Remove `moving su trickery` and other left-overs from %install,
|
||||
%post and %files.
|
||||
Remove %posttrans and %verifyscript sections (as these contained
|
||||
su-related stuff).
|
||||
Add code to %install to remove kill's program and man page.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 20 15:38:30 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
|
@ -24,6 +24,15 @@ Url: http://www.gnu.org/software/coreutils/
|
||||
Version: 8.21
|
||||
Release: 0
|
||||
|
||||
#################################################################
|
||||
#################################################################
|
||||
### ! ! ! R E M I N D E R ! ! ! ###
|
||||
#################################################################
|
||||
### Please call "./pre_checkin.sh" prior to submitting. ###
|
||||
### (This will regenerate coreutils-testsuite.spec) ###
|
||||
#################################################################
|
||||
#################################################################
|
||||
|
||||
BuildRequires: automake
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: help2man
|
||||
@ -44,8 +53,6 @@ BuildRequires: valgrind
|
||||
|
||||
Provides: %{name} = %{version}
|
||||
%if "%{name}" == "coreutils"
|
||||
Provides: /bin/kill
|
||||
Provides: /bin/su
|
||||
Provides: fileutils = %{version}
|
||||
Provides: mktemp = %{version}
|
||||
Provides: sh-utils = %{version}
|
||||
@ -57,10 +64,6 @@ Provides: textutils = %{version}
|
||||
Recommends: %{name}-lang = %version
|
||||
%endif
|
||||
|
||||
# Needed for su.
|
||||
BuildRequires: pam-devel
|
||||
Requires: pam >= 1.1.1.90
|
||||
|
||||
# this will create a cycle, broken up randomly - coreutils is just
|
||||
# too core to have other prerequisites.
|
||||
#PreReq: permissions
|
||||
@ -80,13 +83,12 @@ Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source: coreutils-%{version}.tar.xz
|
||||
%endif
|
||||
|
||||
Source1: su.pamd
|
||||
Source2: su.default
|
||||
Source3: baselibs.conf
|
||||
Source4: coreutils-%{version}.de.po.xz
|
||||
Source1: baselibs.conf
|
||||
Source2: coreutils-%{version}.de.po.xz
|
||||
|
||||
Patch1: coreutils-remove_hostname_documentation.patch
|
||||
#Patch2: coreutils-gl_printf_safe.patch
|
||||
Patch3: coreutils-remove_kill_documentation.patch
|
||||
Patch4: coreutils-i18n.patch
|
||||
Patch8: coreutils-sysinfo.patch
|
||||
Patch16: coreutils-invalid-ids.patch
|
||||
@ -95,7 +97,6 @@ Patch16: coreutils-invalid-ids.patch
|
||||
|
||||
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
|
||||
Patch100: coreutils-build-timeout-as-pie.patch
|
||||
Patch101: coreutils-su.patch
|
||||
|
||||
# Fix gnulib-test failures related to gnulib-tests/nap.h.
|
||||
Patch200: coreutils-gnulib-tests-fix-nap-race.patch
|
||||
@ -119,17 +120,13 @@ the GNU fileutils, sh-utils, and textutils packages.
|
||||
timeout touch tr true truncate tsort tty uname unexpand uniq unlink
|
||||
uptime users vdir wc who whoami yes
|
||||
|
||||
As su(1) and kill(1) have been moved from coreutils to util-linux upstreams,
|
||||
this package provides compatibility symlinks to the old coreutils versions
|
||||
of both programs. This is needed until there's a newer version of the
|
||||
receiving util-linux package available which comes with the new binaries.
|
||||
|
||||
# ================================================
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -n coreutils-%{version}
|
||||
%patch4
|
||||
%patch1
|
||||
%patch3
|
||||
#%%if 0%%{suse_version} > 1200
|
||||
#%%patch2
|
||||
#%%endif
|
||||
@ -138,12 +135,11 @@ receiving util-linux package available which comes with the new binaries.
|
||||
#
|
||||
#%%patch33
|
||||
%patch100
|
||||
%patch101
|
||||
|
||||
%patch200
|
||||
%patch201
|
||||
|
||||
xz -dc %{S:4} >po/de.po
|
||||
xz -dc %{S:2} >po/de.po
|
||||
|
||||
#???## We need to statically link to gmp, otherwise we have a build loop
|
||||
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in
|
||||
@ -184,27 +180,9 @@ make all %{?_smp_mflags} V=1
|
||||
%if "%{name}" == "coreutils"
|
||||
%makeinstall pkglibexecdir=%{_libdir}/%{name}
|
||||
|
||||
# === TRICKERY - PART 1/3 ===
|
||||
# trickery to make the move of su and kill to util-linux as easy as possible
|
||||
# this all needs to go when util-linux 2.22 has been checked in and
|
||||
# everything has settled. 15.10.2012 pth@suse.de
|
||||
# Install su and kill with a ".core" suffix.
|
||||
|
||||
install -d -m 755 %{buildroot}/etc/pam.d
|
||||
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su.core
|
||||
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l.core
|
||||
|
||||
install -d -m 755 %{buildroot}/etc/default
|
||||
install -m 644 %{S:2} %{buildroot}/etc/default/su.core
|
||||
|
||||
install -s -m 755 src/su %{buildroot}%{_bindir}/su.core
|
||||
install -m 644 man/su.1 %{buildroot}%{_mandir}/man1/su.core.1
|
||||
rm -f %{buildroot}%{_mandir}/man1/su.1
|
||||
|
||||
# kill is still part of coreutils, so rename it (stripped).
|
||||
install -s -m 755 %{buildroot}%{_bindir}/kill %{buildroot}%{_bindir}/kill.core
|
||||
rm -f %{buildroot}%{_bindir}/kill
|
||||
mv -v %{buildroot}%{_mandir}/man1/kill.1 %{buildroot}%{_mandir}/man1/kill.core.1
|
||||
# remove kill
|
||||
rm -v %{buildroot}%{_bindir}/kill
|
||||
rm -v %{buildroot}/%{_mandir}/man1/kill.1
|
||||
|
||||
#UsrMerge
|
||||
install -d %{buildroot}/bin
|
||||
@ -223,30 +201,6 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
|
||||
%post
|
||||
%if "%{name}" == "coreutils"
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
|
||||
|
||||
# may fail if permissions is not there, but there is no way around that
|
||||
%set_permissions %{_bindir}/su.core
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%posttrans
|
||||
%if "%{name}" == "coreutils"
|
||||
# === TRICKERY - PART 2/3 ===
|
||||
# If the files are missing after installation, then create links to the
|
||||
# saved ones (with suffix .core).
|
||||
if [ ! -r %{_bindir}/su -a -e %{_bindir}/su.core ]; then
|
||||
echo "%{_bindir}/su does not exist, setting compat symlink to %{_bindir}/su.core"
|
||||
ln -svf %{_bindir}/su.core %{_bindir}/su
|
||||
ln -svf %{_bindir}/kill.core %{_bindir}/kill
|
||||
ln -svf %{_bindir}/su.core /bin/su
|
||||
ln -svf %{_bindir}/kill.core /bin/kill
|
||||
ln -svf /etc/pam.d/su.core /etc/pam.d/su
|
||||
ln -svf /etc/pam.d/su-l.core /etc/pam.d/su-l
|
||||
ln -svf /etc/default/su.core /etc/default/su
|
||||
# man pages are already zipped at that point.
|
||||
mv -vf %{_mandir}/man1/kill.core.1.gz %{_mandir}/man1/kill.1.gz
|
||||
mv -vf %{_mandir}/man1/su.core.1.gz %{_mandir}/man1/su.1.gz
|
||||
fi
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
@ -255,19 +209,12 @@ fi
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%verifyscript
|
||||
%if "%{name}" == "coreutils"
|
||||
%verify_permissions -e %{_bindir}/su.core
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%files
|
||||
%if "%{name}" == "coreutils"
|
||||
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING NEWS README THANKS
|
||||
%attr(4755,root,root) %{_bindir}/su.core
|
||||
%{_bindir}/*
|
||||
#UsrMerge
|
||||
/bin/*
|
||||
@ -276,10 +223,6 @@ fi
|
||||
%doc %{_infodir}/coreutils.info*.gz
|
||||
%doc %{_mandir}/man1/*.1.gz
|
||||
%dir %{_datadir}/locale/*/LC_TIME
|
||||
# === TRICKERY - PART 3/3 ===
|
||||
%config /etc/default/su.core
|
||||
%config /etc/pam.d/su-l.core
|
||||
%config /etc/pam.d/su.core
|
||||
|
||||
%files lang -f coreutils.lang
|
||||
%defattr(-,root,root)
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 7 01:50:04 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
- Remove su(1) and kill(1) - both are provided by util-linux now.
|
||||
* su.pamd, su.default, coreutils-su.patch: Remove patch and PAM
|
||||
config files related to su(1).
|
||||
* coreutils-remove_kill_documentation.patch: Add patch to remove
|
||||
kill from the texinfo manual.
|
||||
* coreutils.spec: Remove above, su-related patch and sources.
|
||||
Remove Requires:pam and BuildRequires:pam-devel.
|
||||
Remove Provides:/bin/{su,kill}.
|
||||
Remove paragraph mentioning su(1) and kill(1) in %description.
|
||||
Remove `moving su trickery` and other left-overs from %install,
|
||||
%post and %files.
|
||||
Remove %posttrans and %verifyscript sections (as these contained
|
||||
su-related stuff).
|
||||
Add code to %install to remove kill's program and man page.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 20 15:38:30 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
|
@ -24,6 +24,15 @@ Url: http://www.gnu.org/software/coreutils/
|
||||
Version: 8.21
|
||||
Release: 0
|
||||
|
||||
#################################################################
|
||||
#################################################################
|
||||
### ! ! ! R E M I N D E R ! ! ! ###
|
||||
#################################################################
|
||||
### Please call "./pre_checkin.sh" prior to submitting. ###
|
||||
### (This will regenerate coreutils-testsuite.spec) ###
|
||||
#################################################################
|
||||
#################################################################
|
||||
|
||||
BuildRequires: automake
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: help2man
|
||||
@ -44,8 +53,6 @@ BuildRequires: valgrind
|
||||
|
||||
Provides: %{name} = %{version}
|
||||
%if "%{name}" == "coreutils"
|
||||
Provides: /bin/kill
|
||||
Provides: /bin/su
|
||||
Provides: fileutils = %{version}
|
||||
Provides: mktemp = %{version}
|
||||
Provides: sh-utils = %{version}
|
||||
@ -57,10 +64,6 @@ Provides: textutils = %{version}
|
||||
Recommends: %{name}-lang = %version
|
||||
%endif
|
||||
|
||||
# Needed for su.
|
||||
BuildRequires: pam-devel
|
||||
Requires: pam >= 1.1.1.90
|
||||
|
||||
# this will create a cycle, broken up randomly - coreutils is just
|
||||
# too core to have other prerequisites.
|
||||
#PreReq: permissions
|
||||
@ -80,13 +83,12 @@ Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source: coreutils-%{version}.tar.xz
|
||||
%endif
|
||||
|
||||
Source1: su.pamd
|
||||
Source2: su.default
|
||||
Source3: baselibs.conf
|
||||
Source4: coreutils-%{version}.de.po.xz
|
||||
Source1: baselibs.conf
|
||||
Source2: coreutils-%{version}.de.po.xz
|
||||
|
||||
Patch1: coreutils-remove_hostname_documentation.patch
|
||||
#Patch2: coreutils-gl_printf_safe.patch
|
||||
Patch3: coreutils-remove_kill_documentation.patch
|
||||
Patch4: coreutils-i18n.patch
|
||||
Patch8: coreutils-sysinfo.patch
|
||||
Patch16: coreutils-invalid-ids.patch
|
||||
@ -95,7 +97,6 @@ Patch16: coreutils-invalid-ids.patch
|
||||
|
||||
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
|
||||
Patch100: coreutils-build-timeout-as-pie.patch
|
||||
Patch101: coreutils-su.patch
|
||||
|
||||
# Fix gnulib-test failures related to gnulib-tests/nap.h.
|
||||
Patch200: coreutils-gnulib-tests-fix-nap-race.patch
|
||||
@ -119,17 +120,13 @@ the GNU fileutils, sh-utils, and textutils packages.
|
||||
timeout touch tr true truncate tsort tty uname unexpand uniq unlink
|
||||
uptime users vdir wc who whoami yes
|
||||
|
||||
As su(1) and kill(1) have been moved from coreutils to util-linux upstreams,
|
||||
this package provides compatibility symlinks to the old coreutils versions
|
||||
of both programs. This is needed until there's a newer version of the
|
||||
receiving util-linux package available which comes with the new binaries.
|
||||
|
||||
# ================================================
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -n coreutils-%{version}
|
||||
%patch4
|
||||
%patch1
|
||||
%patch3
|
||||
#%%if 0%%{suse_version} > 1200
|
||||
#%%patch2
|
||||
#%%endif
|
||||
@ -138,12 +135,11 @@ receiving util-linux package available which comes with the new binaries.
|
||||
#
|
||||
#%%patch33
|
||||
%patch100
|
||||
%patch101
|
||||
|
||||
%patch200
|
||||
%patch201
|
||||
|
||||
xz -dc %{S:4} >po/de.po
|
||||
xz -dc %{S:2} >po/de.po
|
||||
|
||||
#???## We need to statically link to gmp, otherwise we have a build loop
|
||||
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in
|
||||
@ -184,27 +180,9 @@ make all %{?_smp_mflags} V=1
|
||||
%if "%{name}" == "coreutils"
|
||||
%makeinstall pkglibexecdir=%{_libdir}/%{name}
|
||||
|
||||
# === TRICKERY - PART 1/3 ===
|
||||
# trickery to make the move of su and kill to util-linux as easy as possible
|
||||
# this all needs to go when util-linux 2.22 has been checked in and
|
||||
# everything has settled. 15.10.2012 pth@suse.de
|
||||
# Install su and kill with a ".core" suffix.
|
||||
|
||||
install -d -m 755 %{buildroot}/etc/pam.d
|
||||
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su.core
|
||||
install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l.core
|
||||
|
||||
install -d -m 755 %{buildroot}/etc/default
|
||||
install -m 644 %{S:2} %{buildroot}/etc/default/su.core
|
||||
|
||||
install -s -m 755 src/su %{buildroot}%{_bindir}/su.core
|
||||
install -m 644 man/su.1 %{buildroot}%{_mandir}/man1/su.core.1
|
||||
rm -f %{buildroot}%{_mandir}/man1/su.1
|
||||
|
||||
# kill is still part of coreutils, so rename it (stripped).
|
||||
install -s -m 755 %{buildroot}%{_bindir}/kill %{buildroot}%{_bindir}/kill.core
|
||||
rm -f %{buildroot}%{_bindir}/kill
|
||||
mv -v %{buildroot}%{_mandir}/man1/kill.1 %{buildroot}%{_mandir}/man1/kill.core.1
|
||||
# remove kill
|
||||
rm -v %{buildroot}%{_bindir}/kill
|
||||
rm -v %{buildroot}/%{_mandir}/man1/kill.1
|
||||
|
||||
#UsrMerge
|
||||
install -d %{buildroot}/bin
|
||||
@ -223,30 +201,6 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
|
||||
%post
|
||||
%if "%{name}" == "coreutils"
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
|
||||
|
||||
# may fail if permissions is not there, but there is no way around that
|
||||
%set_permissions %{_bindir}/su.core
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%posttrans
|
||||
%if "%{name}" == "coreutils"
|
||||
# === TRICKERY - PART 2/3 ===
|
||||
# If the files are missing after installation, then create links to the
|
||||
# saved ones (with suffix .core).
|
||||
if [ ! -r %{_bindir}/su -a -e %{_bindir}/su.core ]; then
|
||||
echo "%{_bindir}/su does not exist, setting compat symlink to %{_bindir}/su.core"
|
||||
ln -svf %{_bindir}/su.core %{_bindir}/su
|
||||
ln -svf %{_bindir}/kill.core %{_bindir}/kill
|
||||
ln -svf %{_bindir}/su.core /bin/su
|
||||
ln -svf %{_bindir}/kill.core /bin/kill
|
||||
ln -svf /etc/pam.d/su.core /etc/pam.d/su
|
||||
ln -svf /etc/pam.d/su-l.core /etc/pam.d/su-l
|
||||
ln -svf /etc/default/su.core /etc/default/su
|
||||
# man pages are already zipped at that point.
|
||||
mv -vf %{_mandir}/man1/kill.core.1.gz %{_mandir}/man1/kill.1.gz
|
||||
mv -vf %{_mandir}/man1/su.core.1.gz %{_mandir}/man1/su.1.gz
|
||||
fi
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
@ -255,19 +209,12 @@ fi
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%verifyscript
|
||||
%if "%{name}" == "coreutils"
|
||||
%verify_permissions -e %{_bindir}/su.core
|
||||
%endif
|
||||
|
||||
# ================================================
|
||||
%files
|
||||
%if "%{name}" == "coreutils"
|
||||
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING NEWS README THANKS
|
||||
%attr(4755,root,root) %{_bindir}/su.core
|
||||
%{_bindir}/*
|
||||
#UsrMerge
|
||||
/bin/*
|
||||
@ -276,10 +223,6 @@ fi
|
||||
%doc %{_infodir}/coreutils.info*.gz
|
||||
%doc %{_mandir}/man1/*.1.gz
|
||||
%dir %{_datadir}/locale/*/LC_TIME
|
||||
# === TRICKERY - PART 3/3 ===
|
||||
%config /etc/default/su.core
|
||||
%config /etc/pam.d/su-l.core
|
||||
%config /etc/pam.d/su.core
|
||||
|
||||
%files lang -f coreutils.lang
|
||||
%defattr(-,root,root)
|
||||
|
11
su.default
11
su.default
@ -1,11 +0,0 @@
|
||||
# Per default, only "su -" will set a new PATH.
|
||||
# If this variable is changed to "yes" (default is "no"),
|
||||
# every su call will overwrite the PATH variable.
|
||||
ALWAYS_SET_PATH=no
|
||||
|
||||
# Default path.
|
||||
PATH=/usr/local/bin:/bin:/usr/bin
|
||||
|
||||
# Default path for a user invoking su to root.
|
||||
SUPATH=/usr/sbin:/bin:/usr/bin:/sbin
|
||||
|
Loading…
Reference in New Issue
Block a user