Blame SPECS/hostname.spec

0b45b9
Summary: Utility to set/show the host name or domain name
0b45b9
Name: hostname
0b45b9
Version: 3.20
e097d2
Release: 7%{?dist}.0.1
0b45b9
License: GPLv2+
0b45b9
Group: System Environment/Base
0b45b9
URL: http://packages.qa.debian.org/h/hostname.html
0b45b9
Source0: http://ftp.de.debian.org/debian/pool/main/h/hostname/hostname_%{version}.tar.gz
0b45b9
Source1: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
0b45b9
Source2: nis-domainname
0b45b9
Source3: nis-domainname.service
0b45b9
BuildRequires: gcc
0b45b9
0b45b9
# NOTE: We are *not* requiring systemd on purpose, because we want to allow
0b45b9
#       hostname package to be installed in containers without the systemd.
0b45b9
0b45b9
# Initial changes
0b45b9
Patch1: hostname-rh.patch
0b45b9
0b45b9
%description
0b45b9
This package provides commands which can be used to display the system's
0b45b9
DNS name, and to display or set its hostname or NIS domain name.
0b45b9
0b45b9
%prep
0b45b9
%setup -q -n hostname
0b45b9
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} .
0b45b9
%patch1 -p1
0b45b9
0b45b9
%build
0b45b9
make CFLAGS="%{optflags} $CFLAGS -D_GNU_SOURCE" LDFLAGS="$RPM_LD_FLAGS"
0b45b9
0b45b9
%install
0b45b9
make BASEDIR=%{buildroot} BINDIR=%{_bindir} install
0b45b9
0b45b9
install -m 0755 -d %{buildroot}%{_libexecdir}/%{name}
0b45b9
install -m 0755 -d %{buildroot}%{_prefix}/lib/systemd/system
0b45b9
install -m 0755 nis-domainname         %{buildroot}%{_libexecdir}/%{name}
0b45b9
install -m 0644 nis-domainname.service %{buildroot}%{_prefix}/lib/systemd/system
0b45b9
0b45b9
%post
0b45b9
if [ $1 -eq 1 ]; then
0b45b9
  # Initial installation...
0b45b9
  systemctl --no-reload preset nis-domainname.service &>/dev/null || :
0b45b9
fi
0b45b9
0b45b9
%preun
0b45b9
if [ $1 -eq 0 ]; then
0b45b9
  # Package removal, not upgrade...
0b45b9
  systemctl --no-reload disable --now nis-domainname.service &>/dev/null || :
0b45b9
fi
0b45b9
0b45b9
# NOTE: Nothing to do for upgrade (in postun), nis-domainname.service is oneshot.
0b45b9
0b45b9
%files
0b45b9
%doc COPYRIGHT
0b45b9
%{!?_licensedir:%global license %%doc}
0b45b9
%license gpl-2.0.txt
0b45b9
%{_bindir}/*
0b45b9
%{_mandir}/man1/*
0b45b9
%{_prefix}/lib/systemd/system/*
0b45b9
%{_libexecdir}/%{name}/*
0b45b9
0b45b9
%changelog
e097d2
* Thu Jun 03 2021 Carl George <carl@redhat.com> - 3.20-7.0.1
e097d2
- Manually revert 3.20-7 with positive release bump rhbz#1956378
e097d2
9d5203
* Thu May  6 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.20-7
9d5203
- Nisdomainname service depends on network
9d5203
0b45b9
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.20-6
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0b45b9
0b45b9
* Thu May 31 2018 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 3.20-5
0b45b9
- nis-domainname.service moved here from initscripts package
0b45b9
0b45b9
* Wed Mar  7 2018 Pavel Zhukov <pzhukov@redhat.com> - 3.20-4
0b45b9
- Add gcc to BuildRequires
0b45b9
0b45b9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.20-3
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0b45b9
0b45b9
* Thu Feb  1 2018 Florian Weimer <fweimer@redhat.com> - 3.20-2
0b45b9
- Build with linker flags from redhat-rpm-config
0b45b9
0b45b9
* Thu Feb  1 2018 Pavel Zhukov <pzhukov@redhat.com> - 3.20-1
0b45b9
- New version 3.20
0b45b9
0b45b9
* Wed Jan 31 2018 Pavel Zhukov <landgraf@fedoraproject.org> - 3.19-2
0b45b9
- New version 3.19
0b45b9
0b45b9
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-4
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
0b45b9
0b45b9
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-3
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0b45b9
0b45b9
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0b45b9
0b45b9
* Wed Aug 10 2016 Pavel Šimerda <psimerda@redhat.com> - 3.18-1
0b45b9
- New version 3.18
0b45b9
0b45b9
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-7
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0b45b9
0b45b9
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.15-6
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0b45b9
0b45b9
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 3.15-5
0b45b9
- Rebuilt for Fedora 23 Change
0b45b9
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
0b45b9
0b45b9
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.15-4
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
0b45b9
0b45b9
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 3.15-3
0b45b9
- fix license handling
0b45b9
0b45b9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.15-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0b45b9
0b45b9
* Mon Nov 04 2013 Jiri Popelka <jpopelka@redhat.com> - 3.15-1
0b45b9
- 3.15
0b45b9
0b45b9
* Wed Oct 16 2013 Jiri Popelka <jpopelka@redhat.com> - 3.14-3
0b45b9
- use BINDIR
0b45b9
0b45b9
* Mon Oct 14 2013 Jaromír Končický <jkoncick@redhat.com> - 3.14-2
0b45b9
- Install binaries into /usr/bin
0b45b9
0b45b9
* Sun Sep 08 2013 Jiri Popelka <jpopelka@redhat.com> - 3.14-1
0b45b9
- 3.14
0b45b9
0b45b9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0b45b9
0b45b9
* Tue Jun 18 2013 Jiri Popelka <jpopelka@redhat.com> - 3.13-1
0b45b9
- 3.13: -v references removed upstream
0b45b9
0b45b9
* Tue Mar 26 2013 Jiri Popelka <jpopelka@redhat.com> - 3.12-4
0b45b9
- remove void -v option from --help
0b45b9
0b45b9
* Fri Mar 08 2013 Jiri Popelka <jpopelka@redhat.com> - 3.12-3
0b45b9
- do not ship outdated french man pages (#919198)
0b45b9
0b45b9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0b45b9
0b45b9
* Fri Dec 07 2012  Jiri Popelka <jpopelka@redhat.com> - 3.12-1
0b45b9
- 3.12: man page improvements
0b45b9
0b45b9
* Fri Nov 30 2012  Jiri Popelka <jpopelka@redhat.com> - 3.11-4
0b45b9
- revert /usr move for now
0b45b9
0b45b9
* Fri Nov 30 2012  Jiri Popelka <jpopelka@redhat.com> - 3.11-3
0b45b9
- remove some rh-specific bits from rh.patch as they are no longer valid (#881913)
0b45b9
- remove outdated de & pt man pages
0b45b9
- /usr move: use _bindir macro
0b45b9
0b45b9
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0b45b9
0b45b9
* Tue Feb 21 2012  Jiri Popelka <jpopelka@redhat.com> - 3.11-1
0b45b9
- 3.11
0b45b9
0b45b9
* Wed Jan 18 2012  Jiri Popelka <jpopelka@redhat.com> - 3.10-1
0b45b9
- 3.10
0b45b9
0b45b9
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.09-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0b45b9
0b45b9
* Thu Dec 29 2011  Jiri Popelka <jpopelka@redhat.com> - 3.09-1
0b45b9
- 3.09
0b45b9
0b45b9
* Sat Dec 24 2011  Jiri Popelka <jpopelka@redhat.com> - 3.08-1
0b45b9
- 3.08
0b45b9
0b45b9
* Fri Dec 23 2011  Jiri Popelka <jpopelka@redhat.com> - 3.07-1
0b45b9
- 3.07
0b45b9
0b45b9
* Mon Mar 07 2011  Jiri Popelka <jpopelka@redhat.com> - 3.06-1
0b45b9
- 3.06
0b45b9
0b45b9
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.05-2
0b45b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0b45b9
0b45b9
* Tue Nov 16 2010  Jiri Popelka <jpopelka@redhat.com> - 3.05-1
0b45b9
- 3.05
0b45b9
0b45b9
* Fri Apr 30 2010 Ville Skyttä <ville.skytta@iki.fi> - 3.04-2
0b45b9
- Mark localized man pages with %%lang.
0b45b9
0b45b9
* Thu Mar 25 2010  Jiri Popelka <jpopelka@redhat.com> - 3.04-1
0b45b9
- 3.04
0b45b9
0b45b9
* Tue Feb 02 2010  Jiri Popelka <jpopelka@redhat.com> - 3.03-1
0b45b9
- 3.03
0b45b9
0b45b9
* Tue Nov 10 2009  Jiri Popelka <jpopelka@redhat.com> - 3.01-1
0b45b9
- Initial package. Up to now hostname has been part of net-tools package.
0b45b9
- This package is based on Debian's hostname because Debian has had hostname
0b45b9
  as separate package since 1997 and the code is much better then the old one
0b45b9
  contained in net-tools.