2007-01-16 00:26:46 +01:00
|
|
|
#
|
2011-03-04 09:42:27 +01:00
|
|
|
# spec file for package netcfg
|
2007-01-16 00:26:46 +01:00
|
|
|
#
|
2017-03-07 10:58:06 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:26:46 +01:00
|
|
|
#
|
2008-09-08 16:22:46 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:26:46 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-03-05 21:32:42 +01:00
|
|
|
|
2007-01-16 00:26:46 +01:00
|
|
|
Name: netcfg
|
2014-06-09 10:37:53 +02:00
|
|
|
Version: 11.5
|
|
|
|
Release: 0
|
2007-01-16 00:26:46 +01:00
|
|
|
Summary: Network Configuration Files in /etc
|
2013-06-05 13:24:30 +02:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: System/Base
|
2007-01-16 00:26:46 +01:00
|
|
|
Source0: defaultdomain
|
|
|
|
Source1: exports
|
|
|
|
Source2: ftpusers
|
|
|
|
Source3: host.conf
|
|
|
|
Source4: hosts
|
|
|
|
Source5: hosts.allow
|
|
|
|
Source6: hosts.deny
|
|
|
|
Source7: hosts.equiv
|
|
|
|
Source8: hosts.lpd
|
|
|
|
Source9: networks
|
|
|
|
Source10: protocols
|
|
|
|
Source11: services.bz2
|
2014-06-04 12:41:28 +02:00
|
|
|
Source12: hostname
|
2007-01-16 00:26:46 +01:00
|
|
|
Source13: aliases
|
|
|
|
Source14: ethers
|
|
|
|
Source15: netgroup
|
2011-03-03 14:11:19 +01:00
|
|
|
Source16: COPYING
|
2014-02-06 17:31:08 +01:00
|
|
|
Source100: services-compare.pl
|
|
|
|
Source101: services-compare.sh
|
|
|
|
Source102: services-create.pl
|
|
|
|
Source103: services_UPDATING
|
2014-06-09 10:37:53 +02:00
|
|
|
Patch0: services-suse.diff
|
2014-12-01 17:56:22 +01:00
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(pre): coreutils
|
2014-06-09 10:37:53 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
2007-01-16 00:26:46 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
All of the basic configuration files for the network programs including
|
2014-06-09 10:37:53 +02:00
|
|
|
%{_sysconfdir}/aliases, %{_sysconfdir}/protocols, and %{_sysconfdir}/services.
|
2007-01-16 00:26:46 +01:00
|
|
|
|
|
|
|
These are often used by network routines in the C library and therefore
|
|
|
|
must be installed for all network programs.
|
|
|
|
|
2008-01-28 16:01:43 +01:00
|
|
|
%prep
|
|
|
|
|
|
|
|
%build
|
2014-06-09 10:37:53 +02:00
|
|
|
cp %{SOURCE16} .
|
2007-01-16 00:26:46 +01:00
|
|
|
|
|
|
|
%install
|
2014-06-09 10:37:53 +02:00
|
|
|
mkdir -p %{buildroot}/etc
|
2014-06-04 12:41:28 +02:00
|
|
|
for i in hostname aliases defaultdomain exports ftpusers host.conf hosts hosts.allow hosts.deny hosts.equiv hosts.lpd netgroup networks protocols services.bz2 ethers; do
|
2014-06-09 10:37:53 +02:00
|
|
|
install $RPM_SOURCE_DIR/$i %{buildroot}/etc
|
2007-01-16 00:26:46 +01:00
|
|
|
done
|
2014-06-09 10:37:53 +02:00
|
|
|
bunzip2 %{buildroot}%{_sysconfdir}/services.bz2
|
|
|
|
patch -p0 %{buildroot}%{_sysconfdir}/services < $RPM_SOURCE_DIR/services-suse.diff
|
|
|
|
rm -f %{buildroot}%{_sysconfdir}/services.orig
|
|
|
|
ln -s %{_sysconfdir}/hostname %{buildroot}%{_sysconfdir}/HOSTNAME
|
2007-01-16 00:26:46 +01:00
|
|
|
|
|
|
|
%pre
|
2014-12-01 17:55:49 +01:00
|
|
|
# HOSTNAME migration supported scenarios [bnc#858908]:
|
|
|
|
# /etc/HOSTNAME -> /etc/hostname content preservation.
|
|
|
|
# If hostname and HOSTNAME both exist HOSTNAME wins.
|
|
|
|
# Nothing apart from content of the document is preserved
|
|
|
|
# REMOVE after SLE11/openSUSE-13.1 out of MIGRATION support
|
2014-12-17 11:20:53 +01:00
|
|
|
if [ $1 -gt 1 ]; then
|
2014-12-01 17:56:22 +01:00
|
|
|
if [ -f %{_sysconfdir}/HOSTNAME -a ! -L %{_sysconfdir}/HOSTNAME ]; then
|
2014-12-17 12:16:38 +01:00
|
|
|
cat %{_sysconfdir}/HOSTNAME > %{_sysconfdir}/hostname.rpmsave
|
2014-12-17 12:09:44 +01:00
|
|
|
rm -rf %{_sysconfdir}/HOSTNAME %{_sysconfdir}/hostname
|
2014-12-17 12:16:38 +01:00
|
|
|
touch %{_sysconfdir}/hostname
|
2014-12-17 12:09:44 +01:00
|
|
|
ln -s %{_sysconfdir}/hostname %{_sysconfdir}/HOSTNAME
|
2014-06-11 11:24:00 +02:00
|
|
|
fi
|
|
|
|
fi
|
2014-12-01 17:55:49 +01:00
|
|
|
exit 0
|
2007-01-16 00:26:46 +01:00
|
|
|
|
|
|
|
%post
|
2014-12-01 17:29:17 +01:00
|
|
|
# If the defaultdomain changed just prune it, user is not interested in
|
|
|
|
# 0 size file anyway
|
2014-12-17 12:16:38 +01:00
|
|
|
if [ -f %{_sysconfdir}/defaultdomain.rpmnew ]; then
|
|
|
|
rm -f %{_sysconfdir}/defaultdomain.rpmnew
|
|
|
|
fi
|
|
|
|
if [ -f %{_sysconfdir}/hostname.rpmsave ]; then
|
|
|
|
cat %{_sysconfdir}/hostname.rpmsave > %{_sysconfdir}/hostname
|
|
|
|
rm -rf %{_sysconfdir}/HOSTNAME.rpmsave %{_sysconfdir}/hostname.rpmsave
|
2014-12-01 17:29:17 +01:00
|
|
|
fi
|
2007-01-16 00:26:46 +01:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(644,root,root,755)
|
2015-08-25 11:42:29 +02:00
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hostname
|
2014-12-01 17:56:22 +01:00
|
|
|
%{_sysconfdir}/HOSTNAME
|
2014-06-09 10:37:53 +02:00
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/aliases
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/defaultdomain
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ethers
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/exports
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ftpusers
|
|
|
|
%config(noreplace) %{_sysconfdir}/host.conf
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.allow
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.deny
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.equiv
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.lpd
|
|
|
|
%config(noreplace) %{_sysconfdir}/netgroup
|
|
|
|
%config(noreplace) %{_sysconfdir}/networks
|
|
|
|
%config(noreplace) %{_sysconfdir}/protocols
|
|
|
|
%config(noreplace) %{_sysconfdir}/services
|
2011-03-03 14:11:19 +01:00
|
|
|
%doc COPYING
|
2007-01-16 00:26:46 +01:00
|
|
|
|
2008-01-28 16:01:43 +01:00
|
|
|
%changelog
|