Compare commits
36 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39f3e697fe | ||
|
|
3ffdf13553 | ||
|
|
5e962d37c0 | ||
|
|
8880c87645 | ||
|
|
6a3e11677f | ||
|
|
b67019dfc2 | ||
|
|
2409409b90 | ||
|
|
913d826f56 | ||
|
|
61509c055f | ||
|
|
9ff2457c22 | ||
|
|
9847af7f6b | ||
|
|
9116230d30 | ||
|
|
e62dea1fb2 | ||
|
|
a6f325edfb | ||
|
|
36960ca5c7 | ||
|
|
6895ecebff | ||
|
|
61986944a0 | ||
|
|
92f4b31c6c | ||
|
|
0a5e00b205 | ||
|
|
6832a1f761 | ||
|
|
00c631dfeb | ||
|
|
03f56e2286 | ||
|
|
555738f3d3 | ||
|
|
9dfdfc8b73 | ||
|
|
69876215ed | ||
|
|
915f76b231 | ||
|
|
1ad4d004af | ||
|
|
efbebaa178 | ||
|
|
18543d415c | ||
|
|
7192109784 | ||
|
|
b48836eece | ||
|
|
bb49016d75 | ||
|
|
d5b0f37474 | ||
|
|
a368024721 | ||
|
|
16712a2890 | ||
|
|
9acf04b999 |
7 changed files with 135 additions and 139 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1 @@
|
||||||
/amprd-1.4.tgz
|
/amprd-*.tgz
|
||||||
|
|
|
||||||
|
|
@ -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, <marius@yo2loj.ro>
|
|
||||||
#
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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;
|
|
||||||
15
amprd-3.0-install-fix.patch
Normal file
15
amprd-3.0-install-fix.patch
Normal file
|
|
@ -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)
|
||||||
131
amprd.spec
131
amprd.spec
|
|
@ -8,20 +8,21 @@
|
||||||
|
|
||||||
Summary: An user-space IPIP encapsulation daemon for the ampr network
|
Summary: An user-space IPIP encapsulation daemon for the ampr network
|
||||||
Name: amprd
|
Name: amprd
|
||||||
Version: 1.4
|
Version: 3.0.1
|
||||||
Release: 2%{?dist}
|
Release: 11%{?dist}
|
||||||
License: GPLv3+
|
# Automatically converted from old format: GPLv3+ - review is highly recommended.
|
||||||
Group: Applications/Communications
|
License: GPL-3.0-or-later
|
||||||
URL: http://www.yo2loj.ro/hamprojects/
|
URL: http://www.yo2loj.ro/hamprojects/
|
||||||
BuildRequires: dos2unix, systemd
|
BuildRequires: gcc
|
||||||
|
BuildRequires: dos2unix
|
||||||
|
BuildRequires: systemd
|
||||||
|
BuildRequires: make
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
Requires(postun): systemd
|
Requires(postun): systemd
|
||||||
Source0: http://www.yo2loj.ro/hamprojects/%{name}-%{version}.tgz
|
Source0: http://www.yo2loj.ro/hamprojects/%{name}-%{version}.tgz
|
||||||
Source1: amprd.service
|
Source1: amprd.service
|
||||||
Patch0: amprd-1.4-install-fix.patch
|
Patch0: amprd-3.0-install-fix.patch
|
||||||
Patch1: amprd-1.4-pidfile.patch
|
|
||||||
Patch2: amprd-1.4-examples-noshebang.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
An user-space IPIP encapsulation daemon with automatic RIPv2 multicast
|
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.
|
the system for your 44net traffic.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qc
|
%autosetup -p1
|
||||||
%patch0 -p1 -b .install-fix
|
|
||||||
%patch1 -p1 -b .pidfile
|
|
||||||
%patch2 -p1 -b .examples-noshebang
|
|
||||||
|
|
||||||
dos2unix minGlue.h
|
dos2unix minGlue.h
|
||||||
|
|
||||||
|
|
@ -42,7 +40,7 @@ dos2unix minGlue.h
|
||||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{?cflags_harden}" LDFLAGS="%{?__global_ldflags} %{?ldflags_harden}"
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{?cflags_harden}" LDFLAGS="%{?__global_ldflags} %{?ldflags_harden}"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
make %{?_smp_mflags} DESTDIR=%{buildroot} SBINDIR=%{buildroot}%{_sbindir} install
|
||||||
|
|
||||||
# Systemd
|
# Systemd
|
||||||
install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
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
|
%{_unitdir}/amprd.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 25 2024 Miroslav Suchý <msuchy@redhat.com> - 3.0.1-8
|
||||||
|
- convert license to SPDX
|
||||||
|
|
||||||
|
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 12 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 3.0.1-1
|
||||||
|
- New version
|
||||||
|
Resolves: rhbz#2103065
|
||||||
|
|
||||||
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.0-7
|
||||||
|
- Rebuilt for updated systemd-rpm-macros
|
||||||
|
See https://pagure.io/fesco/issue/2583.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-5
|
||||||
|
- Second attempt - Rebuilt for
|
||||||
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu May 2 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 3.0-1
|
||||||
|
- New version
|
||||||
|
Resolves: rhbz#1705380
|
||||||
|
|
||||||
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 20 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.1-6
|
||||||
|
- Fixed FTBFS by adding gcc requirement
|
||||||
|
Resolves: rhbz#1603377
|
||||||
|
|
||||||
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jun 5 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.1-1
|
||||||
|
- New version
|
||||||
|
Resolves: rhbz#1458458
|
||||||
|
|
||||||
|
* Mon Apr 10 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 1.6-1
|
||||||
|
- New version
|
||||||
|
Resolves: rhbz#1440339
|
||||||
|
Updated install-fix patch
|
||||||
|
|
||||||
|
* Tue Apr 4 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 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 <releng@fedoraproject.org> - 1.4-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
* Fri Aug 29 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 1.4-2
|
* Fri Aug 29 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 1.4-2
|
||||||
- Fixed ldflags_harden
|
- Fixed ldflags_harden
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
2cba21d7866c94a30c85daf7468998ae amprd-1.4.tgz
|
SHA512 (amprd-3.0.1.tgz) = 35c28d1fc56cb75dcacfff740f81ec86cffde299551eb9522836316ac19daa0d904a298a8d355ec8b64b29b679b1538dba561c537a81068bc60b9aed2581ba6e
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue