Hello community, here is the log from the commit of package blogc for openSUSE:Factory checked in at 2019-02-27 15:10:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/blogc (Old) and /work/SRC/openSUSE:Factory/.blogc.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "blogc" Wed Feb 27 15:10:20 2019 rev:12 rq:679761 version:0.15.1 Changes: -------- --- /work/SRC/openSUSE:Factory/blogc/blogc.changes 2019-02-13 10:05:06.533565371 +0100 +++ /work/SRC/openSUSE:Factory/.blogc.new.28833/blogc.changes 2019-02-27 15:10:24.230368740 +0100 @@ -1,0 +2,11 @@ +Wed Feb 27 08:58:52 UTC 2019 - [email protected] + +- Update to 0.15.1: + * Backslashes won't escape inline code in source files, to be + more compatible with Markdown spec. To escape a back-tick + character inside inline code, please enclose the code with double back-ticks. + * Simplified implementation of BLOGC_SYSINFO_USERNAME template + variable, to prevent issues with static builds in glibc, due to + some functions requiring shared libraries even when built statically. + +------------------------------------------------------------------- Old: ---- blogc-0.15.0.tar.xz New: ---- blogc-0.15.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ blogc.spec ++++++ --- /var/tmp/diff_new_pack.pY69cG/_old 2019-02-27 15:10:24.766368568 +0100 +++ /var/tmp/diff_new_pack.pY69cG/_new 2019-02-27 15:10:24.770368566 +0100 @@ -17,7 +17,7 @@ Name: blogc -Version: 0.15.0 +Version: 0.15.1 Release: 0 Summary: Blog compiler License: BSD-3-Clause ++++++ blogc-0.15.0.tar.xz -> blogc-0.15.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/.tarball-version new/blogc-0.15.1/.tarball-version --- old/blogc-0.15.0/.tarball-version 2019-02-11 22:22:19.000000000 +0100 +++ new/blogc-0.15.1/.tarball-version 2019-02-26 22:08:01.000000000 +0100 @@ -1 +1 @@ -0.15.0 +0.15.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/.version new/blogc-0.15.1/.version --- old/blogc-0.15.0/.version 2019-02-11 22:22:19.000000000 +0100 +++ new/blogc-0.15.1/.version 2019-02-26 22:08:01.000000000 +0100 @@ -1 +1 @@ -0.15.0 +0.15.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/Makefile.am new/blogc-0.15.1/Makefile.am --- old/blogc-0.15.0/Makefile.am 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/Makefile.am 2019-02-26 22:07:27.000000000 +0100 @@ -534,19 +534,14 @@ tests_blogc_check_sysinfo_LDFLAGS = \ -no-install \ -Wl,--wrap=bc_file_get_contents \ - -Wl,--wrap=gethostname \ + -Wl,--wrap=getenv \ $(NULL) if HAVE_UNISTD_H -if HAVE_SYS_TYPES_H -if HAVE_PWD_H tests_blogc_check_sysinfo_LDFLAGS += \ - -Wl,--wrap=geteuid \ - -Wl,--wrap=getpwuid \ + -Wl,--wrap=gethostname \ $(NULL) endif -endif -endif if HAVE_TIME_H tests_blogc_check_sysinfo_LDFLAGS += \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/Makefile.in new/blogc-0.15.1/Makefile.in --- old/blogc-0.15.0/Makefile.in 2019-02-11 22:22:14.000000000 +0100 +++ new/blogc-0.15.1/Makefile.in 2019-02-26 22:07:56.000000000 +0100 @@ -174,10 +174,9 @@ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ tests/common/check_stdin \ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ $(NULL) -@BUILD_TESTS_TRUE@@HAVE_PWD_H_TRUE@@HAVE_SYS_TYPES_H_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@am__append_17 = \ -@BUILD_TESTS_TRUE@@HAVE_PWD_H_TRUE@@HAVE_SYS_TYPES_H_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=geteuid \ -@BUILD_TESTS_TRUE@@HAVE_PWD_H_TRUE@@HAVE_SYS_TYPES_H_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=getpwuid \ -@BUILD_TESTS_TRUE@@HAVE_PWD_H_TRUE@@HAVE_SYS_TYPES_H_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ $(NULL) +@BUILD_TESTS_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@am__append_17 = \ +@BUILD_TESTS_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=gethostname \ +@BUILD_TESTS_TRUE@@HAVE_UNISTD_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ $(NULL) @BUILD_TESTS_TRUE@@HAVE_TIME_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@am__append_18 = \ @BUILD_TESTS_TRUE@@HAVE_TIME_H_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=time \ @@ -975,7 +974,6 @@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -MAKE_ = @MAKE_@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ @@ -1335,7 +1333,7 @@ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@tests_blogc_check_sysinfo_LDFLAGS = -no-install \ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=bc_file_get_contents \ -@BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=gethostname \ +@BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ -Wl,--wrap=getenv \ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ $(NULL) \ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ $(am__append_17) \ @BUILD_TESTS_TRUE@@USE_CMOCKA_TRUE@@USE_LD_WRAP_TRUE@ $(am__append_18) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/blogc-source.7 new/blogc-0.15.1/blogc-source.7 --- old/blogc-0.15.0/blogc-source.7 2019-02-11 22:22:18.000000000 +0100 +++ new/blogc-0.15.1/blogc-source.7 2019-02-26 22:08:00.000000000 +0100 @@ -304,6 +304,9 @@ . .IP "" 0 . +.P +The later form is particularly useful when a \'`\' is part of the code, because escaping delimiters with \'\e\' is not possible\. +. .SS "Images" Images are defined using the following syntax: . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/blogc.spec new/blogc-0.15.1/blogc.spec --- old/blogc-0.15.0/blogc.spec 2019-02-11 22:22:17.000000000 +0100 +++ new/blogc-0.15.1/blogc.spec 2019-02-26 22:07:59.000000000 +0100 @@ -1,11 +1,11 @@ Name: blogc -Version: 0.15.0 +Version: 0.15.1 Release: 1%{?dist} License: BSD Group: Applications/Text Summary: A blog compiler URL: https://blogc.rgm.io/ -Source0: https://github.com/blogc/blogc/releases/download/v0.15.0/blogc-0.15.0.tar.xz +Source0: https://github.com/blogc/blogc/releases/download/v0.15.1/blogc-0.15.1.tar.xz BuildRequires: gcc, libcmocka-devel, bash, coreutils, diffutils %if ! 0%{?el6} BuildRequires: git, tar, make @@ -43,7 +43,7 @@ blogc-runserver is a simple HTTP server to test blogc websites. %prep -%setup -q -n blogc-0.15.0 +%setup -q -n blogc-0.15.1 %build %if 0%{?el6} @@ -88,6 +88,9 @@ %license LICENSE %changelog +* Tue Feb 26 2019 Rafael G. Martins <[email protected]> 0.15.1-1 +- New release. + * Mon Feb 11 2019 Rafael G. Martins <[email protected]> 0.15.0-1 - New release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/blogc.spec.in new/blogc-0.15.1/blogc.spec.in --- old/blogc-0.15.0/blogc.spec.in 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/blogc.spec.in 2019-02-26 22:07:27.000000000 +0100 @@ -88,6 +88,9 @@ %license LICENSE %changelog +* Tue Feb 26 2019 Rafael G. Martins <[email protected]> 0.15.1-1 +- New release. + * Mon Feb 11 2019 Rafael G. Martins <[email protected]> 0.15.0-1 - New release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/config.h.in new/blogc-0.15.1/config.h.in --- old/blogc-0.15.0/config.h.in 2019-02-11 22:22:13.000000000 +0100 +++ new/blogc-0.15.1/config.h.in 2019-02-26 22:07:55.000000000 +0100 @@ -39,9 +39,6 @@ /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT -/* Define to 1 if you have the <pwd.h> header file. */ -#undef HAVE_PWD_H - /* Define to 1 if you have the <signal.h> header file. */ #undef HAVE_SIGNAL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/configure new/blogc-0.15.1/configure --- old/blogc-0.15.0/configure 2019-02-11 22:22:12.000000000 +0100 +++ new/blogc-0.15.1/configure 2019-02-26 22:07:54.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for blogc 0.15.0. +# Generated by GNU Autoconf 2.69 for blogc 0.15.1. # # Report bugs to <https://github.com/blogc/blogc>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='blogc' PACKAGE_TARNAME='blogc' -PACKAGE_VERSION='0.15.0' -PACKAGE_STRING='blogc 0.15.0' +PACKAGE_VERSION='0.15.1' +PACKAGE_STRING='blogc 0.15.1' PACKAGE_BUGREPORT='https://github.com/blogc/blogc' PACKAGE_URL='https://blogc.rgm.io/' @@ -636,8 +636,6 @@ LTLIBOBJS LIBOBJS LIBM -HAVE_SYS_TYPES_H_FALSE -HAVE_SYS_TYPES_H_TRUE HAVE_SYS_TIME_H_FALSE HAVE_SYS_TIME_H_TRUE HAVE_SYS_RESOURCE_H_FALSE @@ -646,8 +644,6 @@ HAVE_UNISTD_H_TRUE HAVE_TIME_H_FALSE HAVE_TIME_H_TRUE -HAVE_PWD_H_FALSE -HAVE_PWD_H_TRUE BASH USE_BGR_DEPS_FALSE USE_BGR_DEPS_TRUE @@ -667,7 +663,6 @@ CMOCKA_CFLAGS BUILD_RUNSERVER_FALSE BUILD_RUNSERVER_TRUE -MAKE_ BUILD_MAKE_EMBEDDED_FALSE BUILD_MAKE_EMBEDDED_TRUE BUILD_MAKE_LIB_FALSE @@ -1401,7 +1396,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures blogc 0.15.0 to adapt to many kinds of systems. +\`configure' configures blogc 0.15.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1472,7 +1467,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of blogc 0.15.0:";; + short | recursive ) echo "Configuration of blogc 0.15.1:";; esac cat <<\_ACEOF @@ -1604,7 +1599,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -blogc configure 0.15.0 +blogc configure 0.15.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1973,7 +1968,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by blogc $as_me 0.15.0, which was +It was created by blogc $as_me 0.15.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2838,7 +2833,7 @@ # Define the identity of the package. PACKAGE='blogc' - VERSION='0.15.0' + VERSION='0.15.1' cat >>confdefs.h <<_ACEOF @@ -13554,7 +13549,6 @@ fi - RUNSERVER="disabled" # Check whether --enable-runserver was given. if test "${enable_runserver+set}" = set; then : @@ -14714,7 +14708,7 @@ BASH="$ac_cv_path_bash" -for ac_header in sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h pwd.h +for ac_header in sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -14739,14 +14733,6 @@ done - if test "x$ac_cv_header_pwd_h" = "xyes"; then - HAVE_PWD_H_TRUE= - HAVE_PWD_H_FALSE='#' -else - HAVE_PWD_H_TRUE='#' - HAVE_PWD_H_FALSE= -fi - if test "x$ac_cv_header_time_h" = "xyes"; then HAVE_TIME_H_TRUE= HAVE_TIME_H_FALSE='#' @@ -14779,14 +14765,6 @@ HAVE_SYS_TIME_H_FALSE= fi - if test "x$ac_cv_header_sys_types_h" = "xyes"; then - HAVE_SYS_TYPES_H_TRUE= - HAVE_SYS_TYPES_H_FALSE='#' -else - HAVE_SYS_TYPES_H_TRUE='#' - HAVE_SYS_TYPES_H_FALSE= -fi - LIBM= case $host in @@ -15118,10 +15096,6 @@ as_fn_error $? "conditional \"USE_BGR_DEPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_PWD_H_TRUE}" && test -z "${HAVE_PWD_H_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PWD_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_TIME_H_TRUE}" && test -z "${HAVE_TIME_H_FALSE}"; then as_fn_error $? "conditional \"HAVE_TIME_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15138,10 +15112,6 @@ as_fn_error $? "conditional \"HAVE_SYS_TIME_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_SYS_TYPES_H_TRUE}" && test -z "${HAVE_SYS_TYPES_H_FALSE}"; then - as_fn_error $? "conditional \"HAVE_SYS_TYPES_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -15539,7 +15509,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by blogc $as_me 0.15.0, which was +This file was extended by blogc $as_me 0.15.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15606,7 +15576,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -blogc config.status 0.15.0 +blogc config.status 0.15.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/configure.ac new/blogc-0.15.1/configure.ac --- old/blogc-0.15.0/configure.ac 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/configure.ac 2019-02-26 22:07:27.000000000 +0100 @@ -122,7 +122,6 @@ AM_CONDITIONAL([BUILD_MAKE], [test "x$have_make" = "xyes"]) AM_CONDITIONAL([BUILD_MAKE_LIB], [test "x$have_make_lib" = "xyes"]) AM_CONDITIONAL([BUILD_MAKE_EMBEDDED], [test "x$have_make_embedded" = "xyes"]) -AC_SUBST(MAKE_) RUNSERVER="disabled" AC_ARG_ENABLE([runserver], AS_HELP_STRING([--enable-runserver], @@ -220,15 +219,13 @@ BASH="$ac_cv_path_bash" AC_SUBST(BASH) -AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h pwd.h]) +AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h]) AC_CHECK_FUNCS([gethostname]) -AM_CONDITIONAL([HAVE_PWD_H], [test "x$ac_cv_header_pwd_h" = "xyes"]) AM_CONDITIONAL([HAVE_TIME_H], [test "x$ac_cv_header_time_h" = "xyes"]) AM_CONDITIONAL([HAVE_UNISTD_H], [test "x$ac_cv_header_unistd_h" = "xyes"]) AM_CONDITIONAL([HAVE_SYS_RESOURCE_H], [test "x$ac_cv_header_sys_resource_h" = "xyes"]) AM_CONDITIONAL([HAVE_SYS_TIME_H], [test "x$ac_cv_header_sys_time_h" = "xyes"]) -AM_CONDITIONAL([HAVE_SYS_TYPES_H], [test "x$ac_cv_header_sys_types_h" = "xyes"]) LT_LIB_M diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/man/blogc-source.7.ronn new/blogc-0.15.1/man/blogc-source.7.ronn --- old/blogc-0.15.0/man/blogc-source.7.ronn 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/man/blogc-source.7.ronn 2019-02-26 22:07:27.000000000 +0100 @@ -219,6 +219,9 @@ This is inline code: `code` This is inline code: ``code`` +The later form is particularly useful when a '`' is part of the code, because +escaping delimiters with '\' is not possible. + ### Images Images are defined using the following syntax: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/src/blogc/content-parser.c new/blogc-0.15.1/src/blogc/content-parser.c --- old/blogc-0.15.0/src/blogc/content-parser.c 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/src/blogc/content-parser.c 2019-02-26 22:07:27.000000000 +0100 @@ -347,7 +347,7 @@ free(tmp3); tmp3 = NULL; bc_string_append(rv, "<code>"); - bc_string_append_escaped(rv, tmp2); + bc_string_append(rv, tmp2); bc_string_append(rv, "</code>"); current = tmp - src; tmp = NULL; @@ -376,7 +376,7 @@ free(tmp3); tmp3 = NULL; bc_string_append(rv, "<code>"); - bc_string_append_escaped(rv, tmp2); + bc_string_append(rv, tmp2); bc_string_append(rv, "</code>"); current = tmp - src + 1; tmp = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/src/blogc/funcvars.c new/blogc-0.15.1/src/blogc/funcvars.c --- old/blogc-0.15.0/src/blogc/funcvars.c 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/src/blogc/funcvars.c 2019-02-26 22:07:27.000000000 +0100 @@ -30,14 +30,11 @@ {"BLOGC_SYSINFO_HOSTNAME", blogc_sysinfo_inject_hostname}, #endif -#ifdef HAVE_SYSINFO_USERNAME - {"BLOGC_SYSINFO_USERNAME", blogc_sysinfo_inject_username}, -#endif - #ifdef HAVE_SYSINFO_DATETIME {"BLOGC_SYSINFO_DATETIME", blogc_sysinfo_inject_datetime}, #endif + {"BLOGC_SYSINFO_USERNAME", blogc_sysinfo_inject_username}, {"BLOGC_SYSINFO_INSIDE_DOCKER", blogc_sysinfo_inject_inside_docker}, {NULL, NULL}, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/src/blogc/sysinfo.c new/blogc-0.15.1/src/blogc/sysinfo.c --- old/blogc-0.15.0/src/blogc/sysinfo.c 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/src/blogc/sysinfo.c 2019-02-26 22:07:27.000000000 +0100 @@ -14,14 +14,6 @@ #include <unistd.h> #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif /* HAVE_SYS_TYPES_H */ - -#ifdef HAVE_PWD_H -#include <pwd.h> -#endif /* HAVE_PWD_H */ - #ifdef HAVE_TIME_H #include <time.h> #endif /* HAVE_TIME_H */ @@ -66,16 +58,7 @@ char* blogc_sysinfo_get_username(void) { -#ifndef HAVE_SYSINFO_USERNAME - return NULL; -#else - uid_t u = geteuid(); - struct passwd *p = getpwuid(u); - if (p == NULL) - return NULL; - - return bc_strdup(p->pw_name); -#endif + return bc_strdup(getenv("LOGNAME")); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/src/blogc/sysinfo.h new/blogc-0.15.1/src/blogc/sysinfo.h --- old/blogc-0.15.0/src/blogc/sysinfo.h 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/src/blogc/sysinfo.h 2019-02-26 22:07:27.000000000 +0100 @@ -19,14 +19,6 @@ #endif /* HAVE_GETHOSTNAME */ #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H -#ifdef HAVE_PWD_H -#define HAVE_SYSINFO_USERNAME 1 -#endif /* HAVE_PWD_H */ -#endif /* HAVE_SYS_TYPES_H */ -#endif /* HAVE_UNISTD_H */ - #ifdef HAVE_TIME_H #define HAVE_SYSINFO_DATETIME 1 #endif /* HAVE_TIME_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/tests/blogc/check_content_parser.c new/blogc-0.15.1/tests/blogc/check_content_parser.c --- old/blogc-0.15.0/tests/blogc/check_content_parser.c 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/tests/blogc/check_content_parser.c 2019-02-26 22:07:27.000000000 +0100 @@ -1951,11 +1951,15 @@ free(html); html = blogc_content_parse_inline("`bo\\`\\`la`\n"); assert_non_null(html); - assert_string_equal(html, "<code>bo``la</code>\n"); + assert_string_equal(html, "<code>bo\\`\\`la</code>\n"); free(html); html = blogc_content_parse_inline("``bo\\`\\`la``\n"); assert_non_null(html); - assert_string_equal(html, "<code>bo``la</code>\n"); + assert_string_equal(html, "<code>bo\\`\\`la</code>\n"); + free(html); + html = blogc_content_parse_inline("``bo`la``\n"); + assert_non_null(html); + assert_string_equal(html, "<code>bo`la</code>\n"); free(html); html = blogc_content_parse_inline("``bola\n"); assert_non_null(html); @@ -2009,7 +2013,11 @@ free(html); html = blogc_content_parse_inline("[``bola(2)[3]**!\\```](http://example.org/)\n"); assert_non_null(html); - assert_string_equal(html, "<a href=\"http://example.org/\"><code>bola(2)[3]**!`</code></a>\n"); + assert_string_equal(html, "<a href=\"http://example.org/\"><code>bola(2)[3]**!\\`</code></a>\n"); + free(html); + html = blogc_content_parse_inline("[``bola(2)[3]**!```](http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "<a href=\"http://example.org/\"><code>bola(2)[3]**!</code>`</a>\n"); free(html); html = blogc_content_parse_inline("test suite!)\n" "depends on [cmocka](http://cmocka.org/), though.\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blogc-0.15.0/tests/blogc/check_sysinfo.c new/blogc-0.15.1/tests/blogc/check_sysinfo.c --- old/blogc-0.15.0/tests/blogc/check_sysinfo.c 2019-02-11 22:21:42.000000000 +0100 +++ new/blogc-0.15.1/tests/blogc/check_sysinfo.c 2019-02-26 22:07:27.000000000 +0100 @@ -17,16 +17,11 @@ #include "../../src/common/utils.h" #include "../../src/blogc/sysinfo.h" -#ifdef HAVE_SYSINFO_HOSTNAME -#include <unistd.h> -#include <sys/types.h> -#include <pwd.h> -#endif - #ifdef HAVE_SYSINFO_DATETIME #include <time.h> #endif +#ifdef HAVE_SYSINFO_HOSTNAME int __wrap_gethostname(char *name, size_t len) { @@ -36,29 +31,14 @@ strcpy(name, f); return mock_type(int); } +#endif -#ifdef HAVE_SYSINFO_HOSTNAME -uid_t -__wrap_geteuid(void) -{ - return 1234; -} - - -static struct passwd pw; - -struct passwd* -__wrap_getpwuid(uid_t uid) +char* +__wrap_getenv(const char *name) { - assert_int_equal(uid, 1234); - char *n = mock_type(char*); - if (n == NULL) - return NULL; - pw.pw_name = n; - return &pw; + return mock_type(char*); } -#endif #ifdef HAVE_SYSINFO_DATETIME @@ -142,11 +122,11 @@ static void test_sysinfo_get_username(void **state) { - will_return(__wrap_getpwuid, NULL); + will_return(__wrap_getenv, NULL); char *f = blogc_sysinfo_get_username(); assert_null(f); - will_return(__wrap_getpwuid, "bola"); + will_return(__wrap_getenv, "bola"); f = blogc_sysinfo_get_username(); assert_non_null(f); assert_string_equal(f, "bola"); @@ -159,11 +139,11 @@ { bc_trie_t *t = bc_trie_new(free); - will_return(__wrap_getpwuid, NULL); + will_return(__wrap_getenv, NULL); blogc_sysinfo_inject_username(t); assert_int_equal(bc_trie_size(t), 0); - will_return(__wrap_getpwuid, "bola"); + will_return(__wrap_getenv, "bola"); blogc_sysinfo_inject_username(t); assert_int_equal(bc_trie_size(t), 1); assert_string_equal(bc_trie_lookup(t, "BLOGC_SYSINFO_USERNAME"), "bola"); @@ -235,10 +215,8 @@ unit_test(test_sysinfo_inject_hostname), #endif -#ifdef HAVE_SYSINFO_USERNAME unit_test(test_sysinfo_get_username), unit_test(test_sysinfo_inject_username), -#endif #ifdef HAVE_SYSINFO_DATETIME unit_test(test_sysinfo_get_datetime),
