GNU bug report logs - #64483
[PATCH 0/2] gnu: Add mactelnet.

Previous Next

Package: guix-patches;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Wed, 5 Jul 2023 16:32:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64483 in the body.
You can then email your comments to 64483 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64483; Package guix-patches. (Wed, 05 Jul 2023 16:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Victal <mirai <at> makinata.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 05 Jul 2023 16:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 0/2] gnu: Add mactelnet.
Date: Wed,  5 Jul 2023 17:30:54 +0100
Bruno Victal (2):
  gnu: Add mactelnet.
  gnu: mactelnet: Unbundle uthash.

 gnu/local.mk                                  |  1 +
 gnu/packages/admin.scm                        | 48 +++++++++
 .../patches/mactelnet-remove-init.patch       | 98 +++++++++++++++++++
 3 files changed, 147 insertions(+)
 create mode 100644 gnu/packages/patches/mactelnet-remove-init.patch


base-commit: 67c276a870b9d6be69c2a9e867683e58928c38ef
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64483; Package guix-patches. (Wed, 05 Jul 2023 16:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 64483 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: 64483 <at> debbugs.gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 1/2] gnu: Add mactelnet.
Date: Wed,  5 Jul 2023 17:34:04 +0100
* gnu/packages/admin.scm (mactelnet): New variable.
* gnu/packages/patches/mactelnet-remove-init.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/admin.scm                        | 42 ++++++++
 .../patches/mactelnet-remove-init.patch       | 98 +++++++++++++++++++
 3 files changed, 141 insertions(+)
 create mode 100644 gnu/packages/patches/mactelnet-remove-init.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6470f1abd4..95f562e5c1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1558,6 +1558,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/lua-5.4-liblua-so.patch			\
   %D%/packages/patches/luit-posix.patch				\
   %D%/packages/patches/lvm2-static-link.patch			\
+  %D%/packages/patches/mactelnet-remove-init.patch		\
   %D%/packages/patches/mailutils-variable-lookup.patch		\
   %D%/packages/patches/make-impure-dirs.patch			\
   %D%/packages/patches/mariadb-rocksdb-atomic-linking.patch	\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index aea9efa4da..bbcd364dad 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -59,6 +59,7 @@
 ;;; Copyright © 2023 Lu Hui <luhux76 <at> gmail.com>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
 ;;; Copyright © 2023 Alexey Abramov <levenson <at> mmer.org>
+;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5851,3 +5852,44 @@ (define-public du-dust
     (description "This package provides a graphical disk usage analyzer in
 text mode.")
     (license license:asl2.0)))
+
+(define-public mactelnet
+  (package
+    (name "mactelnet")
+    (version "0.4.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/haakonnessjoen/MAC-Telnet")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z63dz22crrvrm0sh2cwpyqb7wqd9m45m6f2641mwmyp6hcpf4k4"))
+              (patches (search-patches "mactelnet-remove-init.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f))  ; no tests
+    (native-inputs (list autoconf automake gettext-minimal))
+    (synopsis "MAC-Telnet utilities for communicating with RouterOS devices")
+    (description "This package provides an implementation of the MAC-Telnet protocol
+used by RouterOS devices.  It provides the following commands:
+@table @command
+@item{macping}
+Ping RouterOS devices or @command{mactelnetd} hosts.
+@item{mactelnetd}
+MAC-Telnet daemon.
+@item{mactelnet}
+MAC-Telnet client.
+@item{mndp}
+Discover other RouterOS devices or @command{mactelnetd} hosts.
+@end table")
+    (home-page "https://lunatic.no/2010/10/routeros-mac-telnet-application-for-linux-users/")
+    (license
+     (list license:gpl2+
+           ;; Note: applies to src/md5.{c,h}
+           ;; This file is likely to be gone in the next release.
+           license:zlib
+           ;; Bundled uthash-1.9.9.
+           license:bsd-2))))
diff --git a/gnu/packages/patches/mactelnet-remove-init.patch b/gnu/packages/patches/mactelnet-remove-init.patch
new file mode 100644
index 0000000000..82372e3fe4
--- /dev/null
+++ b/gnu/packages/patches/mactelnet-remove-init.patch
@@ -0,0 +1,98 @@
+From ca2dff0b97df0ceb8f6357de3a4375ebc09646dd Mon Sep 17 00:00:00 2001
+Message-Id: <ca2dff0b97df0ceb8f6357de3a4375ebc09646dd.1688572750.git.mirai <at> makinata.eu>
+From: Bruno Victal <mirai <at> makinata.eu>
+Date: Wed, 5 Jul 2023 16:43:31 +0100
+Subject: [PATCH] Skip installing init file.
+
+The file refers to hardcoded paths.
+---
+ Makefile.am             |  2 +-
+ config/Makefile.am      |  5 -----
+ config/mactelnetd.init  | 21 ---------------------
+ config/mactelnetd.users | 12 ------------
+ configure.ac            |  2 +-
+ 5 files changed, 2 insertions(+), 40 deletions(-)
+ delete mode 100644 config/Makefile.am
+ delete mode 100644 config/mactelnetd.init
+ delete mode 100644 config/mactelnetd.users
+
+diff --git a/Makefile.am b/Makefile.am
+index 4e67178..264d8ea 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ AUTOMAKE_OPTIONS = foreign
+-SUBDIRS = src doc config po
++SUBDIRS = src doc po
+ 
+ CFLAGS = --pedantic -Wall -std=c99 -O3 
+ LDFLAGS =
+diff --git a/config/Makefile.am b/config/Makefile.am
+deleted file mode 100644
+index 574a2e0..0000000
+--- a/config/Makefile.am
++++ /dev/null
+@@ -1,5 +0,0 @@
+-dist_sysconf_DATA = mactelnetd.users
+-
+-install-exec-hook:
+-	       chmod 600 $(DESTDIR)$(sysconfdir)/mactelnetd.users
+-				 chown root $(DESTDIR)$(sysconfdir)/mactelnetd.users
+diff --git a/config/mactelnetd.init b/config/mactelnetd.init
+deleted file mode 100644
+index b7ddddf..0000000
+--- a/config/mactelnetd.init
++++ /dev/null
+@@ -1,21 +0,0 @@
+-# mactelnetd - MAC-Telnet server
+-#
+-# The MAC-Telnet server provides telnet access via MAC addresses.
+-#
+-# Ubuntu upstart config:
+-
+-description	"MAC-Telnet server"
+-
+-start on filesystem
+-stop on runlevel [!2345]
+-
+-respawn
+-respawn limit 10 5
+-umask 022
+-
+-pre-start script
+-    test -O /etc/mactelnetd.users || { stop; exit 0; }
+-    test -x /usr/sbin/mactelnetd || { stop; exit 0; }
+-end script
+-
+-exec /usr/sbin/mactelnetd -f
+diff --git a/config/mactelnetd.users b/config/mactelnetd.users
+deleted file mode 100644
+index c140e36..0000000
+--- a/config/mactelnetd.users
++++ /dev/null
+@@ -1,12 +0,0 @@
+-# Users file for MAC-Telnetd
+-#
+-####################################################################
+-# WARNING: This file has passwords written in plain-text.          #
+-#          Make sure this file is owned and only readable by root. #
+-####################################################################
+-#
+-# Each line consists of a username and a password seperated by :.
+-# Usernames must be existing users from passwd.
+-#
+-# Format:
+-#username:password
+diff --git a/configure.ac b/configure.ac
+index c0fdda4..9d2f7d7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -34,4 +34,4 @@ AC_FUNC_MALLOC
+ AC_FUNC_STRNLEN
+ AC_CHECK_FUNCS([alarm bzero clock_gettime getpass gettimeofday inet_ntoa memset select setenv setlocale socket strcasecmp strerror strncasecmp sysinfo uname])
+ 
+-AC_OUTPUT(Makefile src/Makefile doc/Makefile config/Makefile po/Makefile.in)
++AC_OUTPUT(Makefile src/Makefile doc/Makefile po/Makefile.in)
+-- 
+2.40.1
+

base-commit: 67c276a870b9d6be69c2a9e867683e58928c38ef
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64483; Package guix-patches. (Wed, 05 Jul 2023 16:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 64483 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: 64483 <at> debbugs.gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 2/2] gnu: mactelnet: Unbundle uthash.
Date: Wed,  5 Jul 2023 17:34:05 +0100
* gnu/packages/admin.scm (mactelnet)[source]: Unbundle uthash.
[inputs]: Add uthash.
[license]: Remove bsd-2.
---
 gnu/packages/admin.scm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index bbcd364dad..c1bcdb01b4 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -114,6 +114,7 @@ (define-module (gnu packages admin)
   #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages datastructures)
   #:use-module (gnu packages dns)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages file)
@@ -5866,12 +5867,19 @@ (define-public mactelnet
               (sha256
                (base32
                 "1z63dz22crrvrm0sh2cwpyqb7wqd9m45m6f2641mwmyp6hcpf4k4"))
-              (patches (search-patches "mactelnet-remove-init.patch"))))
+              (patches (search-patches "mactelnet-remove-init.patch"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (delete-file "src/utlist.h")
+                   (substitute* (find-files "src/" "\\.c$")
+                     (("\"utlist\\.h\"") "<utlist.h>"))))))
     (build-system gnu-build-system)
     (arguments
      (list
       #:tests? #f))  ; no tests
     (native-inputs (list autoconf automake gettext-minimal))
+    (inputs (list uthash))
     (synopsis "MAC-Telnet utilities for communicating with RouterOS devices")
     (description "This package provides an implementation of the MAC-Telnet protocol
 used by RouterOS devices.  It provides the following commands:
@@ -5890,6 +5898,4 @@ (define-public mactelnet
      (list license:gpl2+
            ;; Note: applies to src/md5.{c,h}
            ;; This file is likely to be gone in the next release.
-           license:zlib
-           ;; Bundled uthash-1.9.9.
-           license:bsd-2))))
+           license:zlib))))
-- 
2.40.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 17 Jul 2023 22:26:02 GMT) Full text and rfc822 format available.

Notification sent to Bruno Victal <mirai <at> makinata.eu>:
bug acknowledged by developer. (Mon, 17 Jul 2023 22:26:02 GMT) Full text and rfc822 format available.

Message #16 received at 64483-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 64483-done <at> debbugs.gnu.org
Subject: Re: bug#64483: [PATCH 0/2] gnu: Add mactelnet.
Date: Tue, 18 Jul 2023 00:25:46 +0200
Bruno Victal <mirai <at> makinata.eu> skribis:

>   gnu: Add mactelnet.
>   gnu: mactelnet: Unbundle uthash.

Applied, thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Aug 2023 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.