Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package scdoc for openSUSE:Factory checked 
in at 2021-11-18 10:34:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/scdoc (Old)
 and      /work/SRC/openSUSE:Factory/.scdoc.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "scdoc"

Thu Nov 18 10:34:01 2021 rev:16 rq:931995 version:1.11.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/scdoc/scdoc.changes      2020-12-07 
15:01:33.540792080 +0100
+++ /work/SRC/openSUSE:Factory/.scdoc.new.1895/scdoc.changes    2021-11-18 
10:34:02.811919310 +0100
@@ -1,0 +2,11 @@
+Wed Nov 17 16:07:11 UTC 2021 - Michael Vetter <[email protected]>
+
+- Update to 1.11.2:
+  * Add uninstall target
+  * Escape ' at the beginning of lines
+  * Clean up the installation process
+  * Check for and abort on failed memory allocations
+  * Disallows differing row lengths in table
+- Refresh scdoc-1.6.1-makefile.patch
+
+-------------------------------------------------------------------

Old:
----
  1.11.1.tar.gz

New:
----
  1.11.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ scdoc.spec ++++++
--- /var/tmp/diff_new_pack.BevOMz/_old  2021-11-18 10:34:03.243919712 +0100
+++ /var/tmp/diff_new_pack.BevOMz/_new  2021-11-18 10:34:03.247919715 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package scdoc
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           scdoc
-Version:        1.11.1
+Version:        1.11.2
 Release:        0
 Summary:        A man page generator written in C99
 License:        MIT
@@ -42,7 +42,7 @@
 %make_build PREFIX=%{_prefix}
 
 %install
-%make_install PREFIX=%{_prefix} PCDIR=%{buildroot}%{_datadir}/pkgconfig 
%{?_smp_mflags}
+%make_install PREFIX=%{_prefix} PCDIR=%{_datadir}/pkgconfig %{?_smp_mflags}
 
 %files
 %{_bindir}/scdoc

++++++ 1.11.1.tar.gz -> 1.11.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/Makefile new/scdoc-1.11.2/Makefile
--- old/scdoc-1.11.1/Makefile   2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/Makefile   2021-11-13 09:04:45.000000000 +0100
@@ -1,12 +1,12 @@
-VERSION=1.11.1
-CFLAGS+=-g -DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter
+VERSION=1.11.2
+CFLAGS?=-g
+MAINFLAGS:=-DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter
 LDFLAGS+=-static
 INCLUDE+=-Iinclude
 PREFIX?=/usr/local
-_INSTDIR=$(DESTDIR)$(PREFIX)
-BINDIR?=$(_INSTDIR)/bin
-MANDIR?=$(_INSTDIR)/share/man
-PCDIR?=$(_INSTDIR)/lib/pkgconfig
+BINDIR?=$(PREFIX)/bin
+MANDIR?=$(PREFIX)/share/man
+PCDIR?=$(PREFIX)/share/pkgconfig
 OUTDIR=.build
 HOST_SCDOC=./scdoc
 .DEFAULT_GOAL=all
@@ -24,7 +24,7 @@
 
 $(OUTDIR)/%.o: src/%.c
        @mkdir -p $(OUTDIR)
-       $(CC) -std=c99 -pedantic -c -o $@ $(CFLAGS) $(INCLUDE) $<
+       $(CC) -std=c99 -pedantic -c -o $@ $(CFLAGS) $(MAINFLAGS) $(INCLUDE) $<
 
 scdoc: $(OBJECTS)
        $(CC) $(LDFLAGS) -o $@ $^
@@ -44,13 +44,19 @@
        rm -rf $(OUTDIR) scdoc scdoc.1 scdoc.5 scdoc.pc
 
 install: all
-       mkdir -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man5 $(PCDIR)
-       install -m755 scdoc $(BINDIR)/scdoc
-       install -m644 scdoc.1 $(MANDIR)/man1/scdoc.1
-       install -m644 scdoc.5 $(MANDIR)/man5/scdoc.5
-       install -m644 scdoc.pc $(PCDIR)/scdoc.pc
+       mkdir -p $(DESTDIR)/$(BINDIR) $(DESTDIR)/$(MANDIR)/man1 
$(DESTDIR)/$(MANDIR)/man5 $(DESTDIR)/$(PCDIR)
+       install -m755 scdoc $(DESTDIR)/$(BINDIR)/scdoc
+       install -m644 scdoc.1 $(DESTDIR)/$(MANDIR)/man1/scdoc.1
+       install -m644 scdoc.5 $(DESTDIR)/$(MANDIR)/man5/scdoc.5
+       install -m644 scdoc.pc $(DESTDIR)/$(PCDIR)/scdoc.pc
+
+uninstall:
+       rm -f $(DESTDIR)/$(BINDIR)/scdoc
+       rm -f $(DESTDIR)/$(MANDIR)/man1/scdoc.1
+       rm -f $(DESTDIR)/$(MANDIR)/man5/scdoc.5
+       rm -f $(DESTDIR)/$(PCDIR)/scdoc.pc
 
 check: scdoc scdoc.1 scdoc.5
        @find test -perm -111 -exec '{}' \;
 
-.PHONY: all clean install check
+.PHONY: all clean install uninstall check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/README.md new/scdoc-1.11.2/README.md
--- old/scdoc-1.11.1/README.md  2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/README.md  2021-11-13 09:04:45.000000000 +0100
@@ -12,6 +12,10 @@
     make PREFIX=/usr
     sudo make PREFIX=/usr install
 
+Uninstallation is similar:
+
+    sudo make uninstall
+
 ## Usage
 
 See scdoc(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/include/util.h 
new/scdoc-1.11.2/include/util.h
--- old/scdoc-1.11.1/include/util.h     2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/include/util.h     2021-11-13 09:04:45.000000000 +0100
@@ -25,5 +25,7 @@
 void parser_pushch(struct parser *parser, uint32_t ch);
 void parser_pushstr(struct parser *parser, const char *str);
 int roff_macro(struct parser *p, char *cmd, ...);
+void *xcalloc(size_t n, size_t s);
+void *xrealloc(void *p, size_t s);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/scdoc.5.scd new/scdoc-1.11.2/scdoc.5.scd
--- old/scdoc-1.11.1/scdoc.5.scd        2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/scdoc.5.scd        2021-11-13 09:04:45.000000000 +0100
@@ -122,7 +122,8 @@
 followed by [ or - or ] to align the contents to the left, center, or right,
 followed by a space and the contents of that cell. You may use a space instead
 of an alignment specifier to inherit the alignment of the same column in the
-previous row.
+previous row. Each row must have the same number of columns; empty columns are
+permitted.
 
 The first character of the first row is not limited to | and has special
 meaning. [ will produce a table with borders around each cell. | will produce a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/src/main.c new/scdoc-1.11.2/src/main.c
--- old/scdoc-1.11.1/src/main.c 2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/src/main.c 2021-11-13 09:04:45.000000000 +0100
@@ -248,6 +248,13 @@
                                break;
                        }
                        /* fallthrough */
+               case '\'':
+                       if (!i) {
+                               // Escape ' if it's the first character
+                               fprintf(p->output, "\\&'\\&");
+                               break;
+                       }
+                       /* fallthrough */
                case '!':
                case '?':
                        last = ch;
@@ -425,6 +432,9 @@
                        case '.':
                                fprintf(p->output, "\\&.");
                                break;
+                       case '\'':
+                               fprintf(p->output, "\\&'");
+                               break;
                        case '\\':
                                ch = parser_getch(p);
                                if (ch == UTF8_INVALID) {
@@ -471,6 +481,7 @@
        struct table_row *currow = NULL, *prevrow = NULL;
        struct table_cell *curcell = NULL;
        int column = 0;
+       int numcolumns = -1;
        uint32_t ch;
        parser_pushch(p, '|');
 
@@ -483,14 +494,18 @@
                        goto commit_table;
                case '|':
                        prevrow = currow;
-                       currow = calloc(1, sizeof(struct table_row));
+                       currow = xcalloc(1, sizeof(struct table_row));
                        if (prevrow) {
-                               // TODO: Verify the number of columns match
+                               if (column != numcolumns && numcolumns != -1) {
+                                       parser_fatal(p, "Each row must have the 
"
+                                                       "same number of 
columns");
+                               }
+                               numcolumns = column;
+                               column = 0;
                                prevrow->next = currow;
                        }
-                       curcell = calloc(1, sizeof(struct table_cell));
+                       curcell = xcalloc(1, sizeof(struct table_cell));
                        currow->cell = curcell;
-                       column = 0;
                        if (!table) {
                                table = currow;
                        }
@@ -501,7 +516,7 @@
                                                "starting a row first");
                        } else {
                                struct table_cell *prev = curcell;
-                               curcell = calloc(1, sizeof(struct table_cell));
+                               curcell = xcalloc(1, sizeof(struct table_cell));
                                if (prev) {
                                        prev->next = curcell;
                                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/src/string.c 
new/scdoc-1.11.2/src/string.c
--- old/scdoc-1.11.1/src/string.c       2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/src/string.c       2021-11-13 09:04:45.000000000 +0100
@@ -2,22 +2,19 @@
 #include <stdint.h>
 #include "str.h"
 #include "unicode.h"
+#include "util.h"
 
-static int ensure_capacity(struct str *str, size_t len) {
+static void ensure_capacity(struct str *str, size_t len) {
        if (len + 1 >= str->size) {
-               char *new = realloc(str->str, str->size * 2);
-               if (!new) {
-                       return 0;
-               }
+               char *new = xrealloc(str->str, str->size * 2);
                str->str = new;
                str->size *= 2;
        }
-       return 1;
 }
 
 struct str *str_create() {
-       struct str *str = calloc(1, sizeof(struct str));
-       str->str = malloc(16);
+       struct str *str = xcalloc(1, sizeof(struct str));
+       str->str = xcalloc(16, 1);
        str->size = 16;
        str->len = 0;
        str->str[0] = '\0';
@@ -35,9 +32,7 @@
        if (size <= 0) {
                return -1;
        }
-       if (!ensure_capacity(str, str->len + size)) {
-               return -1;
-       }
+       ensure_capacity(str, str->len + size);
        utf8_encode(&str->str[str->len], ch);
        str->len += size;
        str->str[str->len] = '\0';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/src/util.c new/scdoc-1.11.2/src/util.c
--- old/scdoc-1.11.1/src/util.c 2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/src/util.c 2021-11-13 09:04:45.000000000 +0100
@@ -69,3 +69,21 @@
        fputc('\n', f);
        return l + 1;
 }
+
+void *xcalloc(size_t n, size_t s) {
+       void *p = calloc(n, s);
+       if (!p) {
+               fputs("Out of memory\n", stderr);
+               abort();
+       }
+       return p;
+}
+
+void *xrealloc(void *p, size_t s) {
+       void *ret = realloc(p, s);
+       if (!ret) {
+               fputs("Out of memory\n", stderr);
+               abort();
+       }
+       return ret;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scdoc-1.11.1/test/tables new/scdoc-1.11.2/test/tables
--- old/scdoc-1.11.1/test/tables        2020-12-06 14:59:32.000000000 +0100
+++ new/scdoc-1.11.2/test/tables        2021-11-13 09:04:45.000000000 +0100
@@ -10,3 +10,18 @@
 :-
 EOF
 end 0
+
+begin "Disallows differing row lengths"
+scdoc <<EOF >/dev/null
+bug-example(1)
+
+[-
+:-
+:-
+|-
+:-
+|-
+:-
+:-
+EOF
+end 1

++++++ scdoc-1.6.1-makefile.patch ++++++
--- /var/tmp/diff_new_pack.BevOMz/_old  2021-11-18 10:34:03.307919771 +0100
+++ /var/tmp/diff_new_pack.BevOMz/_new  2021-11-18 10:34:03.307919771 +0100
@@ -1,10 +1,11 @@
-diff -urEbwB scdoc-1.11.1/Makefile scdoc-1.11.1.new/Makefile
---- scdoc-1.11.1/Makefile      2020-12-06 14:59:32.000000000 +0100
-+++ scdoc-1.11.1.new/Makefile  2020-12-07 09:54:20.562270397 +0100
-@@ -1,6 +1,5 @@
- VERSION=1.11.1
- CFLAGS+=-g -DVERSION='"$(VERSION)"' -Wall -Wextra -Werror 
-Wno-unused-parameter
+diff -urEbw scdoc-1.11.2/Makefile scdoc-1.11.2.new/Makefile
+--- scdoc-1.11.2/Makefile      2021-11-13 09:04:45.000000000 +0100
++++ scdoc-1.11.2.new/Makefile  2021-11-17 17:09:08.671402330 +0100
+@@ -1,7 +1,6 @@
+ VERSION=1.11.2
+ CFLAGS?=-g
+ MAINFLAGS:=-DVERSION='"$(VERSION)"' -Wall -Wextra -Werror 
-Wno-unused-parameter
 -LDFLAGS+=-static
  INCLUDE+=-Iinclude
  PREFIX?=/usr/local
- _INSTDIR=$(DESTDIR)$(PREFIX)
+ BINDIR?=$(PREFIX)/bin

Reply via email to