[packages/oidentd] Up to 3.1.0
arekm
arekm at pld-linux.org
Sun Nov 15 12:04:25 CET 2026
commit 96f7fefbe3a454d76cf0fbedbcea22d77d49bac5
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Nov 15 12:03:32 2026 +0100
Up to 3.1.0
oidentd-bind-to-ipv6-too.patch | 17 ----
oidentd-configure-attribute-checks.patch | 50 +++++++++++
oidentd-ip_conntrack.diff | 15 ----
oidentd-linux-2.6.21.patch | 44 ----------
oidentd-multiple-ip.patch | 137 -------------------------------
oidentd.service | 15 ++++
oidentd.spec | 45 ++++++----
7 files changed, 94 insertions(+), 229 deletions(-)
---
diff --git a/oidentd.spec b/oidentd.spec
index b7e22ea..652be9b 100644
--- a/oidentd.spec
+++ b/oidentd.spec
@@ -1,27 +1,28 @@
Summary: Ident server with masquerading support
Summary(pl.UTF-8): Serwer ident z obsługą maskowanych adresów IP
Name: oidentd
-Version: 2.0.8
-Release: 5
-License: GPL
+Version: 3.1.0
+Release: 1
+License: GPL v2
Group: Networking/Daemons
-Source0: http://dl.sourceforge.net/ojnk/%{name}-%{version}.tar.gz
-# Source0-md5: c3d9a56255819ef8904b867284386911
+Source0: https://github.com/janikrabe/oidentd/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5: 88508a22bdf499315c200e308bfefa7e
Source1: %{name}.init
Source2: %{name}.users
Source3: %{name}.sysconfig
Source4: %{name}.conf
Source5: %{name}.inetd
-Patch0: %{name}-ip_conntrack.diff
-Patch1: %{name}-multiple-ip.patch
-Patch2: %{name}-bind-to-ipv6-too.patch
-Patch3: %{name}-linux-2.6.21.patch
-URL: http://ojnk.sourceforge.net/
+Source6: %{name}.service
+# https://github.com/janikrabe/oidentd/commit/0f4ccf4e5d5a0f286e353df3631c9f33292167cf
+Patch0: %{name}-configure-attribute-checks.patch
+URL: https://oidentd.janikrabe.com/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: libnetfilter_conntrack-devel
+BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: ruby-asciidoctor
Requires: %{name}-init = %{version}-%{release}
Provides: identserver
Obsoletes: linux-identd
@@ -71,8 +72,10 @@ Summary: Ident server with masquerading support
Summary(pl.UTF-8): Serwer ident z obsługą maskowanych adresów IP
Group: Networking/Daemons
Requires(post,preun): /sbin/chkconfig
+Requires(post,preun,postun): systemd-units >= 38
Requires: %{name} = %{version}-%{release}
Requires: rc-scripts
+Requires: systemd-units >= 38
Provides: %{name}-init = %{version}-%{release}
Obsoletes: oidentd-inetd
Conflicts: %{name} <= 2.0.7-1
@@ -86,20 +89,23 @@ Ten pakiet pozwala na wystartowanie oidentd jako samodzielnego demona.
%prep
%setup -q
%patch -P0 -p1
-%patch -P1 -p1
-%patch -P2 -p1
-%patch -P3 -p1
+# shipped man pages name /usr/local/etc; make regenerates them with sysconfdir
+%{__rm} doc/oidentd.8 doc/oidentd.conf.5 doc/oidentd_masq.conf.5
%build
%{__aclocal}
%{__autoconf}
+%{__autoheader}
%{__automake}
-%configure
+%configure \
+ --enable-ipv6 \
+ --enable-libnfct \
+ --enable-masq
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{sysconfig/rc-inetd,rc.d/init.d}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{sysconfig/rc-inetd,rc.d/init.d},%{systemdunitdir}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -109,6 +115,7 @@ install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/oidentd
install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/oidentd
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/oidentd_masq.conf
install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/oidentd.conf
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/oidentd.service
%clean
rm -rf $RPM_BUILD_ROOT
@@ -127,12 +134,17 @@ EOF
%post standalone
/sbin/chkconfig --add %{name}
%service oidentd restart
+%systemd_post oidentd.service
%preun standalone
if [ "$1" = "0" ]; then
%service oidentd stop
/sbin/chkconfig --del %{name}
fi
+%systemd_preun oidentd.service
+
+%postun standalone
+%systemd_reload
%post inetd
%service -q rc-inetd reload
@@ -158,4 +170,5 @@ fi
%files standalone
%defattr(644,root,root,755)
%attr(754,root,root) /etc/rc.d/init.d/oidentd
+%{systemdunitdir}/oidentd.service
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/oidentd
diff --git a/oidentd-bind-to-ipv6-too.patch b/oidentd-bind-to-ipv6-too.patch
deleted file mode 100644
index b3b0e51..0000000
--- a/oidentd-bind-to-ipv6-too.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Patch to bind to ipv6 socket as well
-Patch supplied by Fabian Knittel <fabian.knittel at avona.com>
---- oidentd-2.0.8//src/oidentd_inet_util.c 2006-05-22 02:31:19.000000000 +0200
-+++ oidentd-2.0.8.new//src/oidentd_inet_util.c 2010-03-01 20:26:11.000000000 +0100
-@@ -60,6 +60,12 @@
- #ifdef WANT_IPV6
- case AF_INET6:
- SIN6(ai->ai_addr)->sin6_port = listen_port;
-+
-+ if (setsockopt(listenfd, IPPROTO_IPV6, IPV6_V6ONLY, &one,
-+ sizeof(one)) != 0) {
-+ debug("setsockopt IPV6_V6ONLY: %s", strerror(errno));
-+ return (-1);
-+ }
- break;
- #endif
-
diff --git a/oidentd-configure-attribute-checks.patch b/oidentd-configure-attribute-checks.patch
new file mode 100644
index 0000000..cea8925
--- /dev/null
+++ b/oidentd-configure-attribute-checks.patch
@@ -0,0 +1,50 @@
+From 0f4ccf4e5d5a0f286e353df3631c9f33292167cf Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer at redhat.com>
+Date: Wed, 22 Nov 2023 11:47:06 +0100
+Subject: [PATCH] configure.ac: Use global instead of main fragment in
+ __attribute__ checks
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The first argument of AC_COMPILE_IFELSE is intended for top-level
+constructs, not just #include directives. Stop using } … { to
+put top-level constructs into the main code fragment in the second
+argument.
+
+This fixes a build failure with future compilers.
+---
+ configure.ac | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0dd4127..420cb71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -212,18 +212,20 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>],
+ [AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for __attribute__ noreturn)
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>],
+- [ exit(0); } static void foo(void) __attribute__((noreturn));
+- static void foo(void) {exit(0); ])],
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
++static void foo(void) __attribute__((noreturn));
++static void foo(void) {exit(0);}],
++ [exit(0);])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE___ATTRIBUTE__NORETURN, 1, [Define if your compiler has __attribute__ noreturn])],
+ [AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for __attribute__ format)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
+- #include <stdarg.h>],
+- [ exit(0); } static int foo(char *fmt, ...) __attribute__((format (printf, 1, 2)));
+- static int foo(char *fmt, ...) { ])],
++ #include <stdarg.h>
++static void foo(char *fmt, ...) __attribute__((format (printf, 1, 2)));
++static void foo(char *fmt, ...) {}],
++ [exit(0);])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE___ATTRIBUTE__FORMAT, 1, [Define if your compiler has __attribute__ format])],
+ [AC_MSG_RESULT(no)])
diff --git a/oidentd-ip_conntrack.diff b/oidentd-ip_conntrack.diff
deleted file mode 100644
index 8883bde..0000000
--- a/oidentd-ip_conntrack.diff
+++ /dev/null
@@ -1,15 +0,0 @@
---- oidentd-2.0.7/src/kernel/linux.c.orig 2003-02-12 05:06:17.000000000 +0100
-+++ oidentd-2.0.7/src/kernel/linux.c 2005-01-07 00:50:35.000000000 +0100
-@@ -328,6 +328,12 @@
- &nl1, &nl2, &nl3, &nl4, &nr1, &nr2, &nr3, &nr4, &nport_temp, &mport_temp);
-
- if (ret != 21)
-+ ret = sscanf(buf,
-+ "%15s %*d %*d ESTABLISHED src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d packets=%*d bytes=%*d src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d",
-+ proto, &l1, &l2, &l3, &l4, &r1, &r2, &r3, &r4, &masq_lport_temp, &masq_fport_temp,
-+ &nl1, &nl2, &nl3, &nl4, &nr1, &nr2, &nr3, &nr4, &nport_temp, &mport_temp);
-+
-+ if (ret != 21)
- continue;
-
- masq_lport = (in_port_t) masq_lport_tem
diff --git a/oidentd-linux-2.6.21.patch b/oidentd-linux-2.6.21.patch
deleted file mode 100644
index 8415567..0000000
--- a/oidentd-linux-2.6.21.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -ur oidentd.orig/src/kernel/linux.c oidentd-2.0.8/src/kernel/linux.c
---- oidentd.orig/src/kernel/linux.c 2006-05-22 06:58:53.000000000 +0300
-+++ oidentd-2.0.8/src/kernel/linux.c 2007-07-11 21:28:56.000000000 +0300
-@@ -48,6 +48,7 @@
- #define CFILE6 "/proc/net/tcp6"
- #define MASQFILE "/proc/net/ip_masquerade"
- #define CONNTRACK "/proc/net/ip_conntrack"
-+#define NFCONNTRACK "/proc/net/nf_conntrack"
-
- static int netlink_sock;
- extern struct sockaddr_storage proxy;
-@@ -82,7 +83,15 @@
- debug("fopen: %s: %s", CONNTRACK, strerror(errno));
- return false;
- }
-- masq_fp = fopen("/dev/null", "r");
-+
-+ masq_fp = fopen(NFCONNTRACK, "r");
-+ if (masq_fp == NULL) {
-+ if (errno != ENOENT) {
-+ debug("fopen: %s: %s", NFCONNTRACK, strerror(errno));
-+ return false;
-+ }
-+ masq_fp = fopen("/dev/null", "r");
-+ }
- }
-
- netfilter = true;
-@@ -367,6 +376,15 @@
- &nport_temp, &mport_temp);
- }
-
-+ if (ret != 21) {
-+ ret = sscanf(buf,
-+ "%*15s %*d %15s %*d %*d ESTABLISHED src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d packets=%*d bytes=%*d src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d",
-+ proto, &l1, &l2, &l3, &l4, &r1, &r2, &r3, &r4,
-+ &masq_lport_temp, &masq_fport_temp,
-+ &nl1, &nl2, &nl3, &nl4, &nr1, &nr2, &nr3, &nr4,
-+ &nport_temp, &mport_temp);
-+ }
-+
- if (ret != 21)
- continue;
-
diff --git a/oidentd-multiple-ip.patch b/oidentd-multiple-ip.patch
deleted file mode 100644
index 660bb59..0000000
--- a/oidentd-multiple-ip.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -ur oidentd-2.0.8/doc/oidentd.8 oidentd-2.0.8-many-ip/doc/oidentd.8
---- oidentd-2.0.8/doc/oidentd.8 2003-07-13 20:27:52.000000000 +0200
-+++ oidentd-2.0.8-many-ip/doc/oidentd.8 2008-04-14 15:04:26.000000000 +0200
-@@ -50,7 +50,7 @@
-
- .TP
- .B "\-a or \-\-address=<address|hostname>"
--Listen for connections on the specified address. The default is to listen for connections on all configured IP addresses.
-+Listen for connections on the specified address, this option can be specified multiple times. The default is to listen for connections on all configured IP addresses.
-
- .TP
- .B "\-c or \-\-charset=<charset>"
-diff -ur oidentd-2.0.8/src/oidentd.c oidentd-2.0.8-many-ip/src/oidentd.c
---- oidentd-2.0.8/src/oidentd.c 2006-05-22 02:43:26.000000000 +0200
-+++ oidentd-2.0.8-many-ip/src/oidentd.c 2008-04-14 14:55:07.000000000 +0200
-@@ -73,7 +73,7 @@
- char *config_file;
-
- in_port_t listen_port;
--struct sockaddr_storage *addr;
-+struct sockaddr_storage **addr;
-
- int main(int argc, char **argv) {
- int *listen_fds = NULL;
-diff -ur oidentd-2.0.8/src/oidentd_inet_util.c oidentd-2.0.8-many-ip/src/oidentd_inet_util.c
---- oidentd-2.0.8/src/oidentd_inet_util.c 2006-05-22 02:31:19.000000000 +0200
-+++ oidentd-2.0.8-many-ip/src/oidentd_inet_util.c 2008-04-14 15:00:37.000000000 +0200
-@@ -92,16 +92,18 @@
- ** Setup the listening socket(s).
- */
-
--int *setup_listen(struct sockaddr_storage *listen_addr, in_port_t listen_port) {
-+int *setup_listen(struct sockaddr_storage **listen_addr, in_port_t listen_port) {
- int ret;
-- int *bound_fds;
-+ int *bound_fds = NULL;
- u_char listen_port_str[64];
- struct addrinfo hints, *res, *cur;
-+ int naddr = 0;
-
- if (listen_addr != NULL) {
-+ do {
- cur = xcalloc(1, sizeof(struct addrinfo));
-
-- cur->ai_family = listen_addr->ss_family;
-+ cur->ai_family = listen_addr[naddr]->ss_family;
-
- switch (cur->ai_family) {
- #ifdef WANT_IPV6
-@@ -115,20 +117,22 @@
- }
-
- cur->ai_addr = xmalloc(cur->ai_addrlen);
-- memcpy(cur->ai_addr, listen_addr, cur->ai_addrlen);
-+ memcpy(cur->ai_addr, listen_addr[naddr], cur->ai_addrlen);
-
- ret = setup_bind(cur, listen_port);
- free(cur->ai_addr);
- free(cur);
-- free(listen_addr);
-+ free(listen_addr[naddr]);
-
- if (ret == -1)
- return (NULL);
-
-- bound_fds = xmalloc(2 * sizeof(int));
-- bound_fds[0] = ret;
-- bound_fds[1] = -1;
--
-+ bound_fds = xrealloc(bound_fds, (naddr + 2) * sizeof(int));
-+ bound_fds[naddr] = ret;
-+ bound_fds[naddr+1] = -1;
-+ naddr++;
-+ } while (listen_addr[naddr] != NULL);
-+ free(listen_addr);
- return (bound_fds);
- }
-
-diff -ur oidentd-2.0.8/src/oidentd_inet_util.h oidentd-2.0.8-many-ip/src/oidentd_inet_util.h
---- oidentd-2.0.8/src/oidentd_inet_util.h 2006-05-22 00:52:24.000000000 +0200
-+++ oidentd-2.0.8-many-ip/src/oidentd_inet_util.h 2008-04-14 15:00:26.000000000 +0200
-@@ -22,7 +22,7 @@
- #define SIN4(x) ((struct sockaddr_in *) (x))
- #define SIN6(x) ((struct sockaddr_in6 *) (x))
-
--int *setup_listen(struct sockaddr_storage *listen_addr, in_port_t listen_port);
-+int *setup_listen(struct sockaddr_storage **listen_addr, in_port_t listen_port);
-
- int get_port(const char *name, in_port_t *port);
- int get_addr(const char *const hostname, struct sockaddr_storage *g_addr);
-diff -ur oidentd-2.0.8/src/oidentd_options.c oidentd-2.0.8-many-ip/src/oidentd_options.c
---- oidentd-2.0.8/src/oidentd_options.c 2006-05-22 02:31:19.000000000 +0200
-+++ oidentd-2.0.8-many-ip/src/oidentd_options.c 2008-04-14 15:00:49.000000000 +0200
-@@ -53,7 +53,7 @@
- extern u_int32_t timeout;
- extern u_int32_t connection_limit;
- extern in_port_t listen_port;
--extern struct sockaddr_storage *addr;
-+extern struct sockaddr_storage **addr;
- extern uid_t uid;
- extern gid_t gid;
-
-@@ -126,6 +126,7 @@
- int opt;
- char *temp_os;
- char *charset = NULL;
-+ int naddrs = 0;
-
- #ifdef MASQ_SUPPORT
- if (get_port(DEFAULT_FPORT, &fwdport) == -1) {
-@@ -151,13 +152,16 @@
- struct sockaddr_storage *temp_ss =
- xmalloc(sizeof(struct sockaddr_storage));
-
-+ if (naddrs % 16 == 0)
-+ addr = xrealloc(addr, sizeof(struct sockaddr_storage *)*(naddrs+16));
-+
- if (get_addr(optarg, temp_ss) == -1) {
- o_log(NORMAL, "Fatal: Unknown host: \"%s\"", optarg);
- free(temp_ss);
- return (-1);
- }
-
-- addr = temp_ss;
-+ addr[naddrs++] = temp_ss;
- break;
- }
-
-@@ -327,6 +331,8 @@
- return (-1);
- }
- }
-+ if (addr != NULL)
-+ addr[naddrs] = NULL;
-
- if (charset != NULL) {
- size_t len = strlen(temp_os) + strlen(charset) + 4;
diff --git a/oidentd.service b/oidentd.service
new file mode 100644
index 0000000..ead3f16
--- /dev/null
+++ b/oidentd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=RFC 1413 compliant Ident daemon
+Documentation=man:oidentd(8) man:oidentd.conf(5) man:oidentd_masq.conf(5)
+After=network.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/sysconfig/oidentd
+ExecStart=/usr/sbin/oidentd -i -g $OIDENT_GROUP -u $OIDENT_USER $OIDENT_OPTIONS
+ExecReload=/bin/kill -HUP $MAINPID
+PrivateDevices=true
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/oidentd.git/commitdiff/96f7fefbe3a454d76cf0fbedbcea22d77d49bac5
More information about the pld-cvs-commit
mailing list