You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for making this simple to use, but very powerful tool as a lightweight alternative to pi-hole :-)
I wrote a RPM SPEC file that will download the already compiled version from Github (I've never really bothered compiling Go stuff myself when it's already published on Github). It will download the specified version from Github (so if you have a script that will check on GH what the latest release is, you can have this SPEC file build you a package that will fit) and download the appropriate reference config file as well and add it as the example config in /etc/blocky
I've added it below in case it might inspire or help someone (don't mind the changelog, I needs a date and I wrote the SPEC I based this on back in January, I guess ;-) ):
Name: blocky
Version: %{version}
Release: 1%{?dist}
Summary: Fast and lightweight DNS proxy as ad-blocker for local network with many features
BuildArch: x86_64
License: Apache 2.0
%undefine _disable_source_fetch
Source0: https://github.com/0xERR0R/blocky/releases/download/v%{version}/blocky_v%{version}_Linux_x86_64.tar.gz
%description
Fast and lightweight DNS proxy as ad-blocker for local network with many features
%prep
rm -rf %{name}-%{version}
mkdir %{name}-%{version}
cd %{name}-%{version}
/usr/lib/rpm/rpmuncompress -vx %{_sourcedir}/%{name}_v%{version}_Linux_x86_64.tar.gz .
curl https://0xerr0r.github.io/blocky/v%{version}/config.yml > config.yml
%install
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}
cp %{_builddir}/%{name}-%{version}/config.yml %{buildroot}/%{_sysconfdir}/%{name}/config.example.yml
mkdir -p %{buildroot}/%{_bindir}
cp %{_builddir}/%{name}-%{version}/%{name} %{buildroot}/%{_bindir}/%{name}
mkdir -p %{buildroot}/%{_docdir}/%{name}
cp %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/%{_docdir}/%{name}
cp %{_builddir}/%{name}-%{version}/README.md %{buildroot}/%{_docdir}/%{name}
mkdir -p %{buildroot}/lib/systemd/system
cp %{_specdir}/%{name}/%{name}.service %{buildroot}/lib/systemd/system
%clean
rm -rf %{buildroot}
%files
%{_sysconfdir}/%{name}/config.example.yml
%{_bindir}/%{name}
%{_docdir}/%{name}/LICENSE
%{_docdir}/%{name}/README.md
/lib/systemd/system/%{name}.service
%changelog
* Mon Jan 29 2024 Jeffrey van Pelt <[email protected]> - 0.0.1
- Initial RPM package
I also added a systemd Service to start it up accordingly:
[Unit]
Description=Blocky DNS server
After=network.target
[Service]
Restart=on-failure
ExecStart=/usr/sbin/blocky -c /etc/blocky/config.yml
[Install]
WantedBy=multi-user.target
When you have rpmbuild set up, you can build it as follows:
rpmbuild -bb -D '%version 0.24' SPECS/blocky.spec
If anyone has any points of improvement, feel free to comment below! 🚀
The text was updated successfully, but these errors were encountered:
Hi there,
Thanks for making this simple to use, but very powerful tool as a lightweight alternative to pi-hole :-)
I wrote a RPM SPEC file that will download the already compiled version from Github (I've never really bothered compiling Go stuff myself when it's already published on Github). It will download the specified version from Github (so if you have a script that will check on GH what the latest release is, you can have this SPEC file build you a package that will fit) and download the appropriate reference config file as well and add it as the example config in
/etc/blocky
I've added it below in case it might inspire or help someone (don't mind the changelog, I needs a date and I wrote the SPEC I based this on back in January, I guess ;-) ):
I also added a systemd Service to start it up accordingly:
When you have rpmbuild set up, you can build it as follows:
If anyone has any points of improvement, feel free to comment below! 🚀
The text was updated successfully, but these errors were encountered: