# Generated from netchk-0.0.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name netchk Name: rubygem-%{gem_name} Version: 0.0.1 Release: 1%{?dist} Summary: Simple internet troubleshooter License: WTFPL URL: https://github.com/moray95/netchk Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.3.0 # BuildRequires: rubygem(rubocop) # BuildRequires: rubygem(rubocop-performance) BuildArch: noarch %description # Netchk Simple tool to troubleshoot internet connectivity issues. This tool verifies: - your computer has at least one IP address - you have at least one DNS configured - you can reach the configured nameservers - the nameservers can resolve hosts Finally, some ICMP ping statistics are presented with average durations and error rates. ## Installation ```sh gem install netchk ``` ## Usage Just run `netchk` from your terminal and basic diagnosis will start showing you progress and any error if present. Note: On Linux system, this gem requires `sudo` to perform the ICMP ping operations. On macOS, this is not needed. You also can configure how netchk verifies your connections by configuring a `~/.netchk.yaml` or `~/.netchk.yml` file like below. ```yaml # Settings to test DNS server connectivity. dns: # Path to resolv.conf file to check presence and connectivity of DNS. # Path should be absolute to avoid issues when running netchk # from different directories. resolv.conf: /etc/resolv.conf # Settings to test DNS resolution. resolv: # Path to resolv.conf file to use for testing DNS resolution. # Path should be absolute to avoid issues when running netchk # from different directories. It is advised to be the same # as dns.resolv.conf. resolv.conf: /etc/resolv.conf # The list of domains to test for DNS resolution. domains: - google.com - youtube.com - facebook.com # Settings to test icmp ping. icmp: # A list of hosts to ping with ICMP. It is advised to use # IP addresses instead of domains to rule out any issues with # DNS resolution, which is tested separately. hosts: - 1.1.1.1 - 8.8.8.8 # The number of ping to issue each host. count: 20 # The duration in seconds to wait between each ping. # Setting this value too low might cause timeouts. interval: 0.2 ``` Each value is optional. If one is missing the default value will be used. The file above shows the default values. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/moray95/netchk. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %check pushd .%{gem_instdir} # Run the test suite. popd %files %dir %{gem_instdir} %{_bindir}/netchk %exclude %{gem_instdir}/.gitignore %exclude %{gem_instdir}/.rubocop.yml %license %{gem_instdir}/LICENSE.txt %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %{gem_instdir}/Gemfile %{gem_instdir}/Gemfile.lock %doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile %{gem_instdir}/netchk.gemspec %changelog * Tue Sep 14 2021 mockbuilder - 0.0.1-1 - Initial package