Christoph Biedl wrote...

> find attached the NMU ...

Now really attached.

    Christoph
diff -Nru biff-0.17.pre20000412/comsat/comsat.8 
biff-0.17.pre20000412/comsat/comsat.8
--- biff-0.17.pre20000412/comsat/comsat.8       2018-12-08 10:55:29.000000000 
+0100
+++ biff-0.17.pre20000412/comsat/comsat.8       2000-04-13 03:55:56.000000000 
+0200
@@ -54,7 +54,7 @@
 .Xr inetd 8 ) .
 The one line messages are of the form:
 .Pp
-.Dl user@mailbox-offset:/path/to/mailbox
+.Dl user@mailbox-offset
 .Pp
 If the
 .Em user
diff -Nru biff-0.17.pre20000412/comsat/comsat.c 
biff-0.17.pre20000412/comsat/comsat.c
--- biff-0.17.pre20000412/comsat/comsat.c       2018-12-08 10:55:29.000000000 
+0100
+++ biff-0.17.pre20000412/comsat/comsat.c       1999-10-18 01:18:47.000000000 
+0200
@@ -62,7 +62,6 @@
 #include <paths.h>   /* used for _PATH_MAILDIR, _PATH_UTMP, etc. */
 #include <unistd.h>
 #include <stdlib.h>
-#include <time.h>
 
 #include "../version.h"
 
@@ -77,8 +76,8 @@
 static int nutmp;
 
 static void mailfor(char *name);
-static void notify(struct utmp *utp, off_t offset, const char *filename);
-static void jkfprintf(FILE *, const char *name, off_t offset, const char *cr, 
const char *filename);
+static void notify(struct utmp *utp, off_t offset);
+static void jkfprintf(FILE *, const char *name, off_t offset, const char *cr);
 static void onalrm(int);
 
 int main(void) {
@@ -275,26 +274,18 @@
        struct utmp *utp;
        char *cp;
        off_t offset;
-       char *filename;
-
-       dsyslog(LOG_DEBUG, "mailfor: %s\n", name);
 
        /* Break off the file offset part and convert it to an integer. */
        cp = strchr(name, '@');
        if (!cp) return;
        *cp = 0;
-       offset = strtol(cp + 1, &filename, 10);
-       /* if(*filename != '\0')
-               return; */
-
-       if(*filename == ':')
-               filename++;
+       offset = atol(cp + 1);
 
        /* Look through the utmp and call notify() for each matching login. */
        utp = &utmp[nutmp];
        while (--utp >= utmp) {
                if (!strncmp(utp->ut_name, name, sizeof(utmp[0].ut_name)))
-                       notify(utp, offset, filename);
+                       notify(utp, offset);
        }
 }
 
@@ -322,7 +313,7 @@
 /*
  * This actually writes to the user's terminal.
  */
-static void notify(struct utmp *utp, off_t offset, const char *filename)
+static void notify(struct utmp *utp, off_t offset)
 {
        FILE *tp;                              /* file open on tty */
        struct stat stb;
@@ -435,7 +426,7 @@
        /*
         * Print the first few lines of the message.
         */
-       jkfprintf(tp, name, offset, cr, filename);
+       jkfprintf(tp, name, offset, cr);
 
        /*
         * Close up and quit the child process.
@@ -448,7 +439,7 @@
  * This prints a few lines from the mailbox of the user "name" at offset
  * "offset", using "cr" as the line break string, to the file "tp".
  */
-static void jkfprintf(FILE *tp, const char *name, off_t offset, const char 
*cr, const char * filename)
+static void jkfprintf(FILE *tp, const char *name, off_t offset, const char *cr)
 {
        char *cp, ch;
        FILE *fi;
@@ -478,11 +469,8 @@
        /*
         * Open the user's mailbox (recall we're already in the mail spool dir)
         */
-       fi = fopen(filename, "r");
-       if (fi == NULL) {
-               dsyslog(LOG_DEBUG, "couldn't open mailbox %s\n", filename);
-               return;
-       }
+       fi = fopen(name, "r");
+       if (fi == NULL) return;
 
        /* Move to requested offset */
        fseek(fi, offset, L_SET);
diff -Nru biff-0.17.pre20000412/comsat/Makefile 
biff-0.17.pre20000412/comsat/Makefile
--- biff-0.17.pre20000412/comsat/Makefile       2018-12-08 10:55:29.000000000 
+0100
+++ biff-0.17.pre20000412/comsat/Makefile       1999-07-31 23:09:46.000000000 
+0200
@@ -13,7 +13,7 @@
 install: comsat
        install -s -m$(DAEMONMODE) comsat $(INSTALLROOT)$(SBINDIR)/in.comsat
        install -m$(MANMODE) comsat.8 $(INSTALLROOT)$(MANDIR)/man8/in.comsat.8
-       ln -sf in.comsat.8 $(INSTALLROOT)$(MANDIR)/man8/comsat.8
+       ln -sf in.comsat.8 $(MANDIR)/man8/comsat.8
 
 clean:
        rm -f *.o comsat
diff -Nru biff-0.17.pre20000412/debian/changelog 
biff-0.17.pre20000412/debian/changelog
--- biff-0.17.pre20000412/debian/changelog      2018-12-08 10:55:29.000000000 
+0100
+++ biff-0.17.pre20000412/debian/changelog      2018-12-08 10:33:07.000000000 
+0100
@@ -1,3 +1,11 @@
+biff (1:0.17.pre20000412-5.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Use cmake as build system, switch to debhelper.
+    Closes: #777290, #912120
+
+ -- Christoph Biedl <debian.a...@manchmal.in-ulm.de>  Sat, 08 Dec 2018 
10:33:07 +0100
+
 biff (1:0.17.pre20000412-5) unstable; urgency=low
 
   * fixed postrm nit when update-inetd not present (closes: 443143)
diff -Nru biff-0.17.pre20000412/debian/compat 
biff-0.17.pre20000412/debian/compat
--- biff-0.17.pre20000412/debian/compat 1970-01-01 01:00:00.000000000 +0100
+++ biff-0.17.pre20000412/debian/compat 2018-12-05 00:14:24.000000000 +0100
@@ -0,0 +1 @@
+10
diff -Nru biff-0.17.pre20000412/debian/control 
biff-0.17.pre20000412/debian/control
--- biff-0.17.pre20000412/debian/control        2018-12-08 10:55:29.000000000 
+0100
+++ biff-0.17.pre20000412/debian/control        2018-12-08 10:33:07.000000000 
+0100
@@ -2,11 +2,12 @@
 Section: mail
 Priority: extra
 Maintainer: Dave Holland <d...@debian.org>
+Build-Depends: debhelper (>= 10~), cmake
 Standards-Version: 3.7.2
 
 Package: biff
 Architecture: any
-Depends: ${shlibs:Depends}, netbase
+Depends: ${shlibs:Depends}, ${misc:Depends}, netbase
 Description: a mail notification tool
  biff is a small program that prints a message to your terminal
  when new email arrives. Actually, the message is printed by
diff -Nru biff-0.17.pre20000412/debian/patches/old-debian-patches.patch 
biff-0.17.pre20000412/debian/patches/old-debian-patches.patch
--- biff-0.17.pre20000412/debian/patches/old-debian-patches.patch       
1970-01-01 01:00:00.000000000 +0100
+++ biff-0.17.pre20000412/debian/patches/old-debian-patches.patch       
2018-12-08 10:33:07.000000000 +0100
@@ -0,0 +1,105 @@
+Description: Old patches as found in version 1:0.17.pre20000412-5
+Last-Update: 2018-11-25
+
+--- a/comsat/comsat.8
++++ b/comsat/comsat.8
+@@ -54,7 +54,7 @@
+ .Xr inetd 8 ) .
+ The one line messages are of the form:
+ .Pp
+-.Dl user@mailbox-offset
++.Dl user@mailbox-offset:/path/to/mailbox
+ .Pp
+ If the
+ .Em user
+--- a/comsat/comsat.c
++++ b/comsat/comsat.c
+@@ -62,6 +62,7 @@
+ #include <paths.h>   /* used for _PATH_MAILDIR, _PATH_UTMP, etc. */
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <time.h>
+ 
+ #include "../version.h"
+ 
+@@ -76,8 +77,8 @@
+ static int nutmp;
+ 
+ static void mailfor(char *name);
+-static void notify(struct utmp *utp, off_t offset);
+-static void jkfprintf(FILE *, const char *name, off_t offset, const char *cr);
++static void notify(struct utmp *utp, off_t offset, const char *filename);
++static void jkfprintf(FILE *, const char *name, off_t offset, const char *cr, 
const char *filename);
+ static void onalrm(int);
+ 
+ int main(void) {
+@@ -274,18 +275,26 @@
+       struct utmp *utp;
+       char *cp;
+       off_t offset;
++      char *filename;
++
++      dsyslog(LOG_DEBUG, "mailfor: %s\n", name);
+ 
+       /* Break off the file offset part and convert it to an integer. */
+       cp = strchr(name, '@');
+       if (!cp) return;
+       *cp = 0;
+-      offset = atol(cp + 1);
++      offset = strtol(cp + 1, &filename, 10);
++      /* if(*filename != '\0')
++              return; */
++
++      if(*filename == ':')
++              filename++;
+ 
+       /* Look through the utmp and call notify() for each matching login. */
+       utp = &utmp[nutmp];
+       while (--utp >= utmp) {
+               if (!strncmp(utp->ut_name, name, sizeof(utmp[0].ut_name)))
+-                      notify(utp, offset);
++                      notify(utp, offset, filename);
+       }
+ }
+ 
+@@ -313,7 +322,7 @@
+ /*
+  * This actually writes to the user's terminal.
+  */
+-static void notify(struct utmp *utp, off_t offset)
++static void notify(struct utmp *utp, off_t offset, const char *filename)
+ {
+       FILE *tp;                              /* file open on tty */
+       struct stat stb;
+@@ -426,7 +435,7 @@
+       /*
+        * Print the first few lines of the message.
+        */
+-      jkfprintf(tp, name, offset, cr);
++      jkfprintf(tp, name, offset, cr, filename);
+ 
+       /*
+        * Close up and quit the child process.
+@@ -439,7 +448,7 @@
+  * This prints a few lines from the mailbox of the user "name" at offset
+  * "offset", using "cr" as the line break string, to the file "tp".
+  */
+-static void jkfprintf(FILE *tp, const char *name, off_t offset, const char 
*cr)
++static void jkfprintf(FILE *tp, const char *name, off_t offset, const char 
*cr, const char * filename)
+ {
+       char *cp, ch;
+       FILE *fi;
+@@ -469,8 +478,11 @@
+       /*
+        * Open the user's mailbox (recall we're already in the mail spool dir)
+        */
+-      fi = fopen(name, "r");
+-      if (fi == NULL) return;
++      fi = fopen(filename, "r");
++      if (fi == NULL) {
++              dsyslog(LOG_DEBUG, "couldn't open mailbox %s\n", filename);
++              return;
++      }
+ 
+       /* Move to requested offset */
+       fseek(fi, offset, L_SET);
diff -Nru biff-0.17.pre20000412/debian/patches/series 
biff-0.17.pre20000412/debian/patches/series
--- biff-0.17.pre20000412/debian/patches/series 1970-01-01 01:00:00.000000000 
+0100
+++ biff-0.17.pre20000412/debian/patches/series 2018-12-08 10:33:07.000000000 
+0100
@@ -0,0 +1,3 @@
+old-debian-patches.patch
+use-cmake-as-buildsystem.patch
+use-cmake-as-buildsystem-debian-extras.patch
diff -Nru 
biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
 
biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
--- 
biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
   1970-01-01 01:00:00.000000000 +0100
+++ 
biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
   2018-12-08 10:33:07.000000000 +0100
@@ -0,0 +1,20 @@
+Description: Debian-specific changes to the cmake build system
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Forwarded: not-needed
+Last-Update: 2018-11-25
+
+--- a/comsat/CMakeLists.txt
++++ b/comsat/CMakeLists.txt
+@@ -11,10 +11,11 @@
+ install(
+     FILES comsat.8
+     DESTINATION ${MAN_DIR}/man8/
++    RENAME in.comsat.8
+ )
+ INSTALL(
+     CODE "execute_process( \
+         COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-        comsat.8 \$ENV{DESTDIR}${MAN_DIR}/man8/in.comsat.8 \
++        in.comsat.8 \$ENV{DESTDIR}${MAN_DIR}/man8/comsat.8 \
+     )"
+ )
diff -Nru biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem.patch 
biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem.patch
--- biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem.patch 
1970-01-01 01:00:00.000000000 +0100
+++ biff-0.17.pre20000412/debian/patches/use-cmake-as-buildsystem.patch 
2018-12-08 10:33:07.000000000 +0100
@@ -0,0 +1,59 @@
+Description: Use cmake as build system
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Bug-Debian:
+    https://bugs.debian.org/777290
+    https://bugs.debian.org/912120
+Last-Update: 2018-11-25
+
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,9 @@
++cmake_minimum_required(VERSION 3.7)
++project(biff)
++
++set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
++set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
++set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
++
++add_subdirectory(biff)
++add_subdirectory(comsat)
+--- /dev/null
++++ b/biff/CMakeLists.txt
+@@ -0,0 +1,14 @@
++
++add_executable(
++    biff
++    biff.c
++)
++install(
++    TARGETS biff
++    DESTINATION ${BIN_DIR}
++)
++
++install(
++    FILES biff.1
++    DESTINATION ${MAN_DIR}/man1/
++)
+--- /dev/null
++++ b/comsat/CMakeLists.txt
+@@ -0,0 +1,20 @@
++
++add_executable(
++    in.comsat
++    comsat.c
++)
++install(
++    TARGETS in.comsat
++    DESTINATION ${SBIN_DIR}
++)
++
++install(
++    FILES comsat.8
++    DESTINATION ${MAN_DIR}/man8/
++)
++INSTALL(
++    CODE "execute_process( \
++        COMMAND ${CMAKE_COMMAND} -E create_symlink \
++        comsat.8 \$ENV{DESTDIR}${MAN_DIR}/man8/in.comsat.8 \
++    )"
++)
diff -Nru biff-0.17.pre20000412/debian/postinst 
biff-0.17.pre20000412/debian/postinst
--- biff-0.17.pre20000412/debian/postinst       2018-12-08 10:55:29.000000000 
+0100
+++ biff-0.17.pre20000412/debian/postinst       2018-12-08 10:33:07.000000000 
+0100
@@ -19,3 +19,4 @@
        fi
 fi
 
+#DEBHELPER#
diff -Nru biff-0.17.pre20000412/debian/postrm 
biff-0.17.pre20000412/debian/postrm
--- biff-0.17.pre20000412/debian/postrm 2018-12-08 10:55:29.000000000 +0100
+++ biff-0.17.pre20000412/debian/postrm 2018-12-08 10:33:07.000000000 +0100
@@ -7,3 +7,5 @@
 esac
 
 exit 0
+
+#DEBHELPER#
diff -Nru biff-0.17.pre20000412/debian/prerm biff-0.17.pre20000412/debian/prerm
--- biff-0.17.pre20000412/debian/prerm  2018-12-08 10:55:29.000000000 +0100
+++ biff-0.17.pre20000412/debian/prerm  2018-12-08 10:33:07.000000000 +0100
@@ -3,3 +3,5 @@
 if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/biff ]; then
        rm -f /usr/doc/biff
 fi
+
+#DEBHELPER#
diff -Nru biff-0.17.pre20000412/debian/rules biff-0.17.pre20000412/debian/rules
--- biff-0.17.pre20000412/debian/rules  2018-12-08 10:55:29.000000000 +0100
+++ biff-0.17.pre20000412/debian/rules  2018-12-08 10:33:07.000000000 +0100
@@ -1,62 +1,4 @@
 #!/usr/bin/make -f
-# debian.rules file for biff
-# Copyright 2000 by Martin Mitchell.
 
-package=biff
-STRIP=strip
-
-build:
-       $(checkdir)
-       ./configure --installroot=`pwd`/debian/tmp
-       make CFLAGS="-O2 -g -Wall"
-       touch build
-
-clean:
-       $(checkdir)
-       -rm -f build
-       -make distclean
-       -rm `find . -name "*~"`
-       -rm -rf debian/tmp debian/files* debian/substvars core
-
-binary-indep:  checkroot build
-       $(checkdir)
-# There are no architecture-independent files to be uploaded
-# generated by this package.  If there were any they would be
-# made here.
-
-binary-arch:   checkroot build
-       $(checkdir)
-       -rm -rf debian/tmp
-       install -d debian/tmp/usr/bin debian/tmp/usr/sbin debian/tmp/DEBIAN 
debian/tmp/usr/share/doc/biff debian/tmp/usr/share/man/man1 
debian/tmp/usr/share/man/man8
-       make MANDIR=/usr/share/man install
-       install -m 0644 ChangeLog debian/tmp/usr/share/doc/biff
-       cp debian/changelog debian/tmp/usr/share/doc/biff/changelog.Debian
-       gzip -9v debian/tmp/usr/share/doc/biff/*
-       ( cd debian/tmp/usr/share/doc/biff && ln -s ChangeLog.gz changelog.gz )
-       cp debian/copyright debian/tmp/usr/share/doc/biff
-       cp debian/README.debian debian/tmp/usr/share/doc/biff
-       gzip -9v debian/tmp/usr/share/man/man1/*
-       rm debian/tmp/usr/share/man/man8/comsat.8
-       gzip -9v debian/tmp/usr/share/man/man8/*
-       ( cd debian/tmp/usr/share/man/man8 && ln -s in.comsat.8.gz comsat.8.gz )
-       $(STRIP) debian/tmp/usr/bin/biff debian/tmp/usr/sbin/in.comsat
-       install -m 0755 debian/postinst debian/postrm debian/prerm 
debian/tmp/DEBIAN
-       dpkg-shlibdeps debian/tmp/usr/bin/biff debian/tmp/usr/sbin/in.comsat
-       dpkg-gencontrol -isp
-       chown -R root.root debian/tmp
-       chmod -R go=rX debian/tmp
-       dpkg --build debian/tmp ..
-
-define checkdir
-       test -f debian/rules
-endef
-
-# Below here is fairly generic really
-
-binary:                binary-indep binary-arch
-
-checkroot:
-       $(checkdir)
-       test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+%:
+       dh $@ --buildsystem=cmake
diff -Nru biff-0.17.pre20000412/debian/source/format 
biff-0.17.pre20000412/debian/source/format
--- biff-0.17.pre20000412/debian/source/format  1970-01-01 01:00:00.000000000 
+0100
+++ biff-0.17.pre20000412/debian/source/format  2018-12-05 00:14:24.000000000 
+0100
@@ -0,0 +1 @@
+3.0 (quilt)

Attachment: signature.asc
Description: PGP signature

Reply via email to