From 32a57891467968c18b70ed6a8f0fe87833ec1b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Sat, 21 Dec 2024 20:35:06 +0100 Subject: [PATCH 1/3] Include Fedora RPM spec file Should be used together with packit for creating spec versions. --- pkg/rpm-fedora/nss-mdns.spec | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkg/rpm-fedora/nss-mdns.spec diff --git a/pkg/rpm-fedora/nss-mdns.spec b/pkg/rpm-fedora/nss-mdns.spec new file mode 100644 index 0000000..b646e0a --- /dev/null +++ b/pkg/rpm-fedora/nss-mdns.spec @@ -0,0 +1,57 @@ +Name: nss-mdns +Version: 0.15.1 +Release: %autorelease +Summary: glibc plugin for .local name resolution + +License: LGPL-2.1+ +URL: https://github.com/avahi/nss-mdns +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: make +BuildRequires: gcc +BuildRequires: pkgconfig(check) +Requires: avahi +Requires(preun,posttrans): authselect + +%description +nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality of +the GNU C Library (glibc) providing host name resolution via Multicast DNS +(aka Zeroconf, aka Apple Rendezvous, aka Apple Bonjour), effectively allowing +name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local. + +nss-mdns provides client functionality only, which means that you have to +run a mDNS responder daemon separately from nss-mdns if you want to register +the local host name via mDNS (e.g. Avahi). + + +%prep +%autosetup -p1 + +%build +%configure +%make_build + +%check +%make_build check || (R=$?; cat ./test-suite.log; exit $R) + +%install +%make_install + + +%posttrans +authselect enable-feature with-mdns4 > /dev/null || : + +%preun +authselect disable-feature with-mdns4 > /dev/null || : + +%{?ldconfig_scriptlets} + + +%files +%license LICENSE +%doc README.md NEWS.md ACKNOWLEDGEMENTS.md +%{_libdir}/libnss_mdns*.so.2* + + +%changelog +%autochangelog From c39fc4d4855921d289bb2045332530001019138e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Sat, 21 Dec 2024 20:43:54 +0100 Subject: [PATCH 2/3] Create autoconf from source Recreate ./configure even if it were shipped from sources. It is not in sources now anyway. --- pkg/rpm-fedora/nss-mdns.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/rpm-fedora/nss-mdns.spec b/pkg/rpm-fedora/nss-mdns.spec index b646e0a..71ca6b3 100644 --- a/pkg/rpm-fedora/nss-mdns.spec +++ b/pkg/rpm-fedora/nss-mdns.spec @@ -10,6 +10,9 @@ Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig(check) +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool Requires: avahi Requires(preun,posttrans): authselect @@ -28,6 +31,7 @@ the local host name via mDNS (e.g. Avahi). %autosetup -p1 %build +autoreconf -fiv %configure %make_build From 60c217c8d8eac9569e4e7783d2dc15b0b59a06fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Sat, 21 Dec 2024 20:50:27 +0100 Subject: [PATCH 3/3] Add packit rule file --- .packit.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .packit.yml diff --git a/.packit.yml b/.packit.yml new file mode 100644 index 0000000..cc5424b --- /dev/null +++ b/.packit.yml @@ -0,0 +1,29 @@ +--- +specfile_path: pkg/rpm-fedora/nss-mdns.spec +files_to_sync: + - .packit.yml + - src: pkg/rpm-fedora/nss-mdns.spec + dest: nss-mdns.spec +upstream_package_name: nss-mdns +downstream_package_name: nss-mdns +upstream_tag_template: "v{version}" +srpm_build_deps: [] +csmock_args: --cppcheck-add-flag=--enable=style + +jobs: +- job: copr_build + trigger: pull_request + targets: + - fedora-all-aarch64 + - fedora-all-i386 + - fedora-all-ppc64le + - fedora-all-s390x + - fedora-all-x86_64 +- job: copr_build + trigger: commit + targets: + - fedora-all-aarch64 + - fedora-all-i386 + - fedora-all-ppc64le + - fedora-all-s390x + - fedora-all-x86_64