diff --git a/.gitignore b/.gitignore index ee32fba..ac15078 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/amprd-1.4.tgz +/amprd-*.tgz diff --git a/amprd-1.4-examples-noshebang.patch b/amprd-1.4-examples-noshebang.patch deleted file mode 100644 index 2190c49..0000000 --- a/amprd-1.4-examples-noshebang.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/startup_example.sh b/startup_example.sh -index fa5b6b0..6ea9171 100755 ---- a/startup_example.sh -+++ b/startup_example.sh -@@ -1,5 +1,3 @@ --#!/bin/bash -- - # - # Example script to start amprd 1.0 - Marius, YO2LOJ, - # diff --git a/amprd-1.4-install-fix.patch b/amprd-1.4-install-fix.patch deleted file mode 100644 index 21d9ff0..0000000 --- a/amprd-1.4-install-fix.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/Makefile b/Makefile -index 06688e9..b56e067 100644 ---- a/Makefile -+++ b/Makefile -@@ -2,26 +2,22 @@ - # Makefile for ampr-ripd - # - --CONFDIR = /etc --SBINDIR = /usr/sbin --SCACHEDIR = /var/lib/amprd -- --# no need to run dx-broadcast as root --OWN = daemon --GRP = daemon -+CONFDIR = $(DESTDIR)/etc -+SBINDIR = $(DESTDIR)/usr/sbin -+SCACHEDIR = $(DESTDIR)/var/lib/amprd - - CC = gcc --COPT = -Wall -O2 -+CFLAGS = -Wall -O2 - LD = gcc --LOPT = -+LDFLAGS = - - OBJFILES = amprd.o tunnel.o minIni.o list.o rip.o encap.o cache.o route.o - - .c.o: -- $(CC) $(COPT) -c $< -+ $(CC) $(CFLAGS) -c $< - - amprd: $(OBJFILES) -- $(LD) $(LOPT) -o amprd $(OBJFILES) -+ $(LD) $(LDFLAGS) -o amprd $(OBJFILES) - - all: amprd - -@@ -30,6 +26,6 @@ clean: - - install: amprd - # strip amprd -- install -m 755 -o $(OWN) -g $(GRP) -d $(SCACHEDIR) -- install -m 644 -o $(OWN) -g $(GRP) amprd.conf.example $(CONFDIR) -- install -m 755 -o $(OWN) -g $(GRP) amprd $(SBINDIR) -+ install -m 755 -p -d -D $(SCACHEDIR) -+ install -m 644 -p -D amprd.conf.example $(CONFDIR)/amprd.conf -+ install -m 755 -p -D amprd $(SBINDIR)/amprd diff --git a/amprd-1.4-pidfile.patch b/amprd-1.4-pidfile.patch deleted file mode 100644 index 4439f33..0000000 --- a/amprd-1.4-pidfile.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff --git a/amprd.c b/amprd.c -index 4eee8d2..5a3eb99 100644 ---- a/amprd.c -+++ b/amprd.c -@@ -68,6 +68,7 @@ - #include "commons.h" - - #define MAXPAYLOAD (2048) -+#define PIDFILE "/var/run/amprd.pid" - - char *passwd = NULL; - int debug = FALSE; -@@ -83,6 +84,7 @@ uint32_t general_ampr_gw; - - uint32_t myips[MYIPSIZE]; - -+void (*sigterm_defhnd)(int); - - void on_alarm(int sig) - { -@@ -146,6 +148,16 @@ void on_hup(int sig) - verbose = FALSE; - } - -+void on_term(int sig) -+{ -+ signal(SIGTERM, SIG_IGN); -+ -+ unlink(PIDFILE); -+ -+ signal(SIGTERM, sigterm_defhnd); -+ raise(SIGTERM); -+} -+ - uint32_t getip(const char *dev) - { - struct ifreq ifr; -@@ -260,6 +272,7 @@ int main(int argc, char**argv) - struct pollfd *pollfd; - int i, j, payload, best, mask, bmask; - Tunnel *tunnel; -+ FILE *pidfile; - - char *ip = malloc(MAXPAYLOAD + 18); /* eth header + tcp/ip frame + checksum */ - char *rcv = malloc(MAXPAYLOAD + 20); /* ip header + tcp/ip frame */ -@@ -343,7 +356,6 @@ int main(int argc, char**argv) - sa.sa_handler = on_hup; - sigaction(SIGHUP, &sa, 0); - -- - if (FALSE == debug) - { - pid_t fork_res = -1; -@@ -361,6 +373,12 @@ int main(int argc, char**argv) - } - } - -+ sa.sa_handler = on_term; -+ sigaction(SIGTERM, &sa, 0); -+ pidfile = fopen(PIDFILE, "w"); -+ fprintf(pidfile, "%d\n", (int)getpid()); -+ fclose(pidfile); -+ - pollfd = malloc(sizeof(struct pollfd) * (numtunnels + 1)); - - pollfd[0].fd = raw_socket; diff --git a/amprd-3.0-install-fix.patch b/amprd-3.0-install-fix.patch new file mode 100644 index 0000000..d9bace1 --- /dev/null +++ b/amprd-3.0-install-fix.patch @@ -0,0 +1,15 @@ +diff --git a/Makefile b/Makefile +index 5ba1f27..9525629 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,8 +34,8 @@ module_clean: + + install: amprd + install -m 755 -p -d -D $(SCACHEDIR) +- install -m 644 -p -b -D amprd.conf.example $(CONFDIR)/amprd.conf.example +- install -m 755 -p -s -D amprd $(SBINDIR)/amprd ++ install -m 644 -p -D amprd.conf.example $(CONFDIR)/amprd.conf ++ install -m 755 -p -D amprd $(SBINDIR)/amprd + + uninstall: + rm -fr $(SCACHEDIR) diff --git a/amprd.spec b/amprd.spec index 05d8110..a0f0f7a 100644 --- a/amprd.spec +++ b/amprd.spec @@ -8,20 +8,21 @@ Summary: An user-space IPIP encapsulation daemon for the ampr network Name: amprd -Version: 1.4 -Release: 2%{?dist} -License: GPLv3+ -Group: Applications/Communications +Version: 3.0.1 +Release: 11%{?dist} +# Automatically converted from old format: GPLv3+ - review is highly recommended. +License: GPL-3.0-or-later URL: http://www.yo2loj.ro/hamprojects/ -BuildRequires: dos2unix, systemd +BuildRequires: gcc +BuildRequires: dos2unix +BuildRequires: systemd +BuildRequires: make Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Source0: http://www.yo2loj.ro/hamprojects/%{name}-%{version}.tgz Source1: amprd.service -Patch0: amprd-1.4-install-fix.patch -Patch1: amprd-1.4-pidfile.patch -Patch2: amprd-1.4-examples-noshebang.patch +Patch0: amprd-3.0-install-fix.patch %description An user-space IPIP encapsulation daemon with automatic RIPv2 multicast @@ -31,10 +32,7 @@ inside the daemon and it offers one or more virtual TUN interfaces to the system for your 44net traffic. %prep -%setup -qc -%patch0 -p1 -b .install-fix -%patch1 -p1 -b .pidfile -%patch2 -p1 -b .examples-noshebang +%autosetup -p1 dos2unix minGlue.h @@ -42,7 +40,7 @@ dos2unix minGlue.h make %{?_smp_mflags} CFLAGS="%{optflags} %{?cflags_harden}" LDFLAGS="%{?__global_ldflags} %{?ldflags_harden}" %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install +make %{?_smp_mflags} DESTDIR=%{buildroot} SBINDIR=%{buildroot}%{_sbindir} install # Systemd install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service @@ -70,6 +68,113 @@ install -Dpm 644 -t %{buildroot}%{_datadir}/%{name} startup_example.sh interface %{_unitdir}/amprd.service %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 3.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Wed Jul 23 2025 Fedora Release Engineering - 3.0.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 16 2025 Fedora Release Engineering - 3.0.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jul 25 2024 Miroslav Suchý - 3.0.1-8 +- convert license to SPDX + +* Wed Jul 17 2024 Fedora Release Engineering - 3.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 3.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 3.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 3.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 18 2023 Fedora Release Engineering - 3.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 3.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jul 12 2022 Jaroslav Škarvada - 3.0.1-1 +- New version + Resolves: rhbz#2103065 + +* Wed Jan 19 2022 Fedora Release Engineering - 3.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 3.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 3.0-7 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 3.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jul 31 2020 Fedora Release Engineering - 3.0-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu May 2 2019 Jaroslav Škarvada - 3.0-1 +- New version + Resolves: rhbz#1705380 + +* Thu Jan 31 2019 Fedora Release Engineering - 2.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 20 2018 Jaroslav Škarvada - 2.1-6 +- Fixed FTBFS by adding gcc requirement + Resolves: rhbz#1603377 + +* Thu Jul 12 2018 Fedora Release Engineering - 2.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 5 2017 Jaroslav Škarvada - 2.1-1 +- New version + Resolves: rhbz#1458458 + +* Mon Apr 10 2017 Jaroslav Škarvada - 1.6-1 +- New version + Resolves: rhbz#1440339 + Updated install-fix patch + +* Tue Apr 4 2017 Jaroslav Škarvada - 1.5-1 +- New version + Resolves: rhbz#1438614 +- Dropped pidfile and examples-noshebang patches (both upstreamed) +- Updated install-fix patch + +* Fri Feb 10 2017 Fedora Release Engineering - 1.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jun 16 2015 Fedora Release Engineering - 1.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Fri Aug 29 2014 Jaroslav Škarvada - 1.4-2 - Fixed ldflags_harden diff --git a/sources b/sources index 31f6356..f244163 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2cba21d7866c94a30c85daf7468998ae amprd-1.4.tgz +SHA512 (amprd-3.0.1.tgz) = 35c28d1fc56cb75dcacfff740f81ec86cffde299551eb9522836316ac19daa0d904a298a8d355ec8b64b29b679b1538dba561c537a81068bc60b9aed2581ba6e