commit ae6f35efdcf05243766a8b25efcdef542fc7fcd3b3e78e4fe7207fe2400dee9e Author: Marcus Rueckert Date: Tue Jan 28 17:36:31 2025 +0000 Update to version 3.25 OBS-URL: https://build.opensuse.org/package/show/network:utilities/hostname?expand=0&rev=27 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/hostname-3.23.tar.gz b/hostname-3.23.tar.gz new file mode 100644 index 0000000..dbfe7b1 --- /dev/null +++ b/hostname-3.23.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc6d1954b22849869ff8b2a602e39f08b1702f686d4b58dd7927cdeb5b4876ef +size 13672 diff --git a/hostname-3.25.tar.xz b/hostname-3.25.tar.xz new file mode 100644 index 0000000..a97ec00 --- /dev/null +++ b/hostname-3.25.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bb5d1be011158090157c9e7587ae5606c262a5020ecdc5caac6686b9910592e +size 12804 diff --git a/hostname.changes b/hostname.changes new file mode 100644 index 0000000..87a2a0c --- /dev/null +++ b/hostname.changes @@ -0,0 +1,128 @@ +------------------------------------------------------------------- +Wed Dec 4 05:20:54 UTC 2024 - ming li + +- update to 3.25: + * Removed old rule that moved file from /usr/bin to /bin. + (Closes: #1056978) + + hostname 3.24: + [ Gioele Barabucci ] + * d/control: Add VCS URLs (Closes: #1050091) + * Makefile: Adopt GNU/debhelper conventions + * d/rules: Simplify using debhelper 13 (Closes: #1050093) + * d/rules: Extract program version using sed + * d/control: Update standards version to 4.6.2, no changes needed + * d/control: Specify Rules-Requires-Root: no + [ binlingyu ] + * Fix memory leak + [ lingyu bin ] + * Update .gitlab-ci.yml file + [ Michael Meskes ] + * Fixed VCS information + * Enable build with ubuntu suffixes. + Thanks to Matthias Klose (Closes: #995889) + * Update standards version to 4.7.0, no changes needed + * Release 3.24 + + hostname 3.23+nmu1: + * Non-maintainer upload. + * Convert d/copyright to machine-readable format. (Closes: #1013131) + * Upgrade to 3.0 source format. (Closes: #1007059) + +------------------------------------------------------------------- +Tue Dec 27 12:26:47 UTC 2022 - Ludwig Nussel + +- Replace transitional %usrmerged macro with regular version check (boo#1206798) + +------------------------------------------------------------------- +Mon Oct 19 16:04:14 UTC 2020 - Ludwig Nussel + +- prepare usrmerge (boo#1029961) + +------------------------------------------------------------------- +Wed Aug 26 07:43:53 UTC 2020 - Dirk Mueller + +- update to 3.23: + * Increase buffer size for all FQDNs to NI_MAXHOST as suggested by manpage. + (Closes: #942311) + * Use the same size for getdomainname(). + * Bumped Standards-Version, no changes needed. + +------------------------------------------------------------------- +Fri May 15 13:30:45 UTC 2020 - Neal Gompa + +- Fix LIBEXECDIR substitution for systemd service + +------------------------------------------------------------------- +Sun Apr 12 14:06:27 UTC 2020 - Neal Gompa + +- Add nis-domainname.service for FreeIPA + +------------------------------------------------------------------- +Thu Oct 18 03:10:44 UTC 2018 - sean@suspend.net + +- Update to 3.21: + * Minor fixes to the manpage + +------------------------------------------------------------------- +Mon Mar 26 17:24:51 CEST 2018 - kukuk@suse.de + +- Use %license instead of %doc [bsc#1082318] + +------------------------------------------------------------------- +Sun Feb 18 21:23:47 UTC 2018 - avindra@opensuse.org + +- Update to 3.20 + * debian-specific change only +- includes 3.19 + * Fix lintian warnings. +- includes 3.18 + * Make sure memory is initialized to zero before attempting to + read hostname. +- includes 3.17 + * Use _GNU_SOURCE feature test macro, instead of glibc internal + __USE_GNU. + * Use getdomainname instead of yp_get_default_domain because it + is more widely available and avoids the -lnsl dependency. + * localnisdomain is kept, even though it should be the same as + localdomain, so the behaviour is not changed in case of an error. + * Replace 'dh-clean -k' with 'dh-prep' +- cleanup with spec-cleaner + +------------------------------------------------------------------- +Tue Aug 15 21:55:30 CEST 2017 - kukuk@suse.de + +- Add build require libnsl-devel in preparation of libnsl removal + from glibc. + +------------------------------------------------------------------- +Thu Mar 31 14:25:58 CEST 2016 - kukuk@suse.de + +- Add ypdomainname and nisdomainname, too. Were removed from yp-tools. + +------------------------------------------------------------------- +Tue Sep 8 12:32:33 UTC 2015 - nemysis@openSUSE.org + +- Update to 3.16, announce message: + + * Changed buffer size to the recommended 255 character when working with + names instead of IPs. (Closes: #796922) + * Bumped Standards-Version to 3.9.6, no changes needed. + +- Use %{name} instead of hostname +- Use CFLAGS="%{optflags}" to fix 'File is compiled without RPM_OPT_FLAGS' +- Add changelog to Documentation + +------------------------------------------------------------------- +Thu Jun 11 07:31:16 UTC 2015 - dimstar@opensuse.org + +- BuildIgnore hostname (ourselves): net-tools has a dependency on + hostname, and net-tools is part of the VMInstall package set. As + we know we do not rely on our own code to build, we can safely + ignore hostname and break that nasty buildcycle. + +------------------------------------------------------------------- +Wed Jun 10 08:39:32 UTC 2015 - gber@opensuse.org + +- initial packaging + diff --git a/hostname.spec b/hostname.spec new file mode 100644 index 0000000..adc6236 --- /dev/null +++ b/hostname.spec @@ -0,0 +1,94 @@ +# +# spec file for package hostname +# +# Copyright (c) 2024 SUSE LLC +# +# 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. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: hostname +Version: 3.25 +Release: 0 +Summary: Utility to Set/Show the Host Name or Domain Name +License: GPL-2.0-or-later +Group: Productivity/Networking/Other +URL: https://tracker.debian.org/pkg/hostname +Source0: http://http.debian.net/debian/pool/main/h/%{name}/%{name}_%{version}.tar.xz#/%{name}-%{version}.tar.xz +Source1: nis-domainname +Source2: nis-domainname.service.in +BuildRequires: gcc +BuildRequires: systemd-rpm-macros +# net-tools requires hostname, but we know we do not rely on ourselves to build +#!BuildIgnore: hostname + +%description +This package provides commands which can be used to display the system's DNS +name, and to display or set its hostname or NIS domain name. + +%prep +%setup -q -n %{name} +cp %{SOURCE1} %{SOURCE2} . + +%build +make %{?_smp_mflags} CFLAGS="%{optflags} -D_GNU_SOURCE" + +%install +install -D -p -m 755 %{name} %{buildroot}%{_bindir}/%{name} +%if 0%{?suse_version} < 1550 +install -d -m 755 %{buildroot}/bin/ +ln -sf %{_bindir}/%{name} %{buildroot}/bin/%{name} +%endif +install -D -p -m 644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 +for prog in dnsdomainname domainname ypdomainname nisdomainname; do +%if 0%{?suse_version} < 1550 + ln -sf %{_bindir}/%{name} %{buildroot}/bin/$prog +%endif + ln -sf %{_bindir}/%{name} %{buildroot}%{_bindir}/$prog + ln -sf hostname.1 %{buildroot}%{_mandir}/man1/${prog}.1 +done +sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" nis-domainname.service.in > nis-domainname.service +install -m 0755 -d %{buildroot}%{_libexecdir}/%{name} +install -m 0755 -d %{buildroot}%{_unitdir} +install -p -m 0755 nis-domainname %{buildroot}%{_libexecdir}/%{name} +install -p -m 0644 nis-domainname.service %{buildroot}%{_unitdir} + +%post +%systemd_post nis-domainname.service + +%preun +%systemd_preun nis-domainname.service + +%files +%license COPYRIGHT +%doc debian/changelog +%if 0%{?suse_version} < 1550 +/bin/%{name} +/bin/domainname +/bin/dnsdomainname +/bin/nisdomainname +/bin/ypdomainname +%endif +%{_bindir}/%{name} +%{_bindir}/domainname +%{_bindir}/dnsdomainname +%{_bindir}/nisdomainname +%{_bindir}/ypdomainname +%{_mandir}/man1/%{name}.1%{ext_man} +%{_mandir}/man1/domainname.1%{ext_man} +%{_mandir}/man1/dnsdomainname.1%{ext_man} +%{_mandir}/man1/nisdomainname.1%{ext_man} +%{_mandir}/man1/ypdomainname.1%{ext_man} +%{_unitdir}/nis-domainname.service +%{_libexecdir}/%{name}/ + +%changelog diff --git a/nis-domainname b/nis-domainname new file mode 100644 index 0000000..0686be0 --- /dev/null +++ b/nis-domainname @@ -0,0 +1,10 @@ +#!/bin/bash + +source /etc/sysconfig/network/config + +if [ -n "${NETCONFIG_NIS_STATIC_DOMAIN}" ] && [ "${NETCONFIG_NIS_SETDOMAINNAME}" = "yes" ] && [ -x /usr/bin/nisdomainname ]; then + nisdomainname ${NETCONFIG_NIS_STATIC_DOMAIN} + exit $? +fi + +exit 0 diff --git a/nis-domainname.service.in b/nis-domainname.service.in new file mode 100644 index 0000000..7e2a76e --- /dev/null +++ b/nis-domainname.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=Read and set NIS domainname from /etc/sysconfig/network/config +Before=ypbind.service yppasswdd.service ypserv.service ypxfrd.service sysinit.target +DefaultDependencies=no +Conflicts=shutdown.target +ConditionPathExists=/etc/sysconfig/network/config + +[Service] +ExecStart=@LIBEXECDIR@/hostname/nis-domainname +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target