From e3dec26f425533d2141472632c6894a2d522df73 Mon Sep 17 00:00:00 2001
From: Zsombor Welker <fedora@zdeqb.com>
Date: Fri, 19 Mar 2021 16:56:37 +0100
Subject: [PATCH] Cleanup README and RPM spec

---
 .gitignore                                    |  4 +--
 README.md                                     |  6 ++--
 ...ocker.spec => systemd-resolved-docker.spec | 31 ++++++++++---------
 3 files changed, 20 insertions(+), 21 deletions(-)
 rename python-systemd-resolved-docker.spec => systemd-resolved-docker.spec (65%)

diff --git a/.gitignore b/.gitignore
index 8f27d07..79c7cf3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
 /dist
-/*.egg-info
-/rpm/*.rpm
-/rpm/*.tar.gz
+*.egg-info
 __pycache__
diff --git a/README.md b/README.md
index b8b36d6..ee65a39 100644
--- a/README.md
+++ b/README.md
@@ -23,12 +23,12 @@ For Fedora and RPM based systems [COPR](https://copr.fedorainfracloud.org/coprs/
     
         dnf install systemd-resolved-docker
     
-1. Start and optionally enable the services
+1. Start and optionally enable the service
    
        systemctl start  systemd-resolved-docker
        systemctl enable systemd-resolved-docker
 
-1. Docker should be updated to use the DNS server provided by `systemd-docker-resolved.` This may be done
+1. Docker should be updated to use the DNS server provided by `systemd-docker-resolved`. This may be done
    globally by editing the docker daemon's configuration (`daemon.json`) or per-container using the `--dns`
    flag.
 
@@ -98,4 +98,4 @@ If there are link-local, VPN or other DNS servers configured than those will als
 
 ## Links
 
-Portions are based on [docker-auto-dnsmasq](https://github.com/metal3d/docker-auto-dnsmasq).
\ No newline at end of file
+Portions are based on [docker-auto-dnsmasq](https://github.com/metal3d/docker-auto-dnsmasq).
diff --git a/python-systemd-resolved-docker.spec b/systemd-resolved-docker.spec
similarity index 65%
rename from python-systemd-resolved-docker.spec
rename to systemd-resolved-docker.spec
index ae603d3..4e34a25 100644
--- a/python-systemd-resolved-docker.spec
+++ b/systemd-resolved-docker.spec
@@ -1,27 +1,23 @@
 %global srcname systemd-resolved-docker
 %global eggname systemd_resolved_docker
 
-Name:           python-%{srcname}
+Name:           %{srcname}
 Version:        0.1.0
 Release:        1%{?dist}
 Summary:        systemd-resolved and docker DNS integration
 
-License:        BSD
-URL:            https://pypi.python.org/pypi/systemd_resolved_docker
-#Source0:        ${pypi_source}
+License:        MIT
+URL:            https://github.com/flaktack/systemd-resolved-docker
+# Sources can be obtained by
+# git clone https://github.com/flaktack/systemd-resolved-docker
+# cd systemd-resolved-docker
+# tito build --tgz
 Source0:        %{srcname}-%{version}.tar.gz
 Source1:        %{srcname}.service
 Source2:        %{srcname}.sysconfig
 
 BuildArch:      noarch
 
-%global _description %{expand:
-systemd-resolved and docker DNS integration}
-
-%description %_description
-
-%package -n python3-%{srcname}
-Summary:        %{summary}
 %if 0%{?el6}
 BuildRequires: python34-devel
 BuildRequires: python34-setuptools
@@ -31,7 +27,14 @@ BuildRequires: python3-setuptools
 %endif
 BuildRequires: systemd-rpm-macros
 
-%description -n python3-%{srcname} %_description
+%description
+Provides systemd-resolved and docker DNS integration.
+
+A DNS server is configured to listen on each docker interface's IP address. This is used to:
+1. expose the systemd-resolved DNS service (127.0.0.53) to docker containers by proxying DNS requests, since the systems
+   loopback IPs can't be accessed from containers.
+2. adds the created DNS servers to the docker interface using systemd-resolved so that docker containers may be
+   referenced by hostname. This uses --hostname and --domainname, --network or a default of .docker to create the domains.
 
 #-- PREP, BUILD & INSTALL -----------------------------------------------------#
 %prep
@@ -65,8 +68,7 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{srcname}
 
 
 #-- FILES ---------------------------------------------------------------------#
-# Note that there is no %%files section for the unversioned python module
-%files -n python3-%{srcname}
+%files
 %doc README.md
 %{python3_sitelib}/%{eggname}-*.egg-info/
 %{python3_sitelib}/%{eggname}/
@@ -79,4 +81,3 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{srcname}
 %changelog
 * Fri Mar 19 2021 Zsombor Welker <fedora@zdeqb.com> 0.1.0-1
 - Initial Version
-
-- 
GitLab