Hello community, here is the log from the commit of package at for openSUSE:Factory checked in at 2012-11-30 12:19:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/at (Old) and /work/SRC/openSUSE:Factory/.at.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "at", Maintainer is "vdziewie...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/at/at.changes 2012-11-28 10:06:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.at.new/at.changes 2012-11-30 12:19:49.000000000 +0100 @@ -1,0 +2,11 @@ +Wed Nov 28 21:46:58 UTC 2012 - crrodrig...@opensuse.org + +- When sysconfig variables are empty, do not set stuff to zero + just use the defaults. + +------------------------------------------------------------------- +Wed Nov 28 20:51:49 UTC 2012 - crrodrig...@opensuse.org + +- Fix systemd unit and sysconfig parsing the right way. + +------------------------------------------------------------------- New: ---- at-parse-suse-sysconfig.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ at.spec ++++++ --- /var/tmp/diff_new_pack.ishM4q/_old 2012-11-30 12:19:51.000000000 +0100 +++ /var/tmp/diff_new_pack.ishM4q/_new 2012-11-30 12:19:51.000000000 +0100 @@ -18,6 +18,7 @@ Name: at BuildRequires: autoconf +BuildRequires: automake BuildRequires: bison BuildRequires: flex BuildRequires: libselinux-devel @@ -61,11 +62,14 @@ Patch18: %{name}-%{version}-atrm-race.patch #PATCH-FIX-UPSTREAM wrong mtime handling of jobdir (bnc#680113) Patch19: %{name}-%{version}-jobdir-mtime.patch +Patch20: at-parse-suse-sysconfig.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %{_sbindir}/useradd %{_sbindir}/groupadd %fillup_prereq %insserv_prereq PreReq: permissions Recommends: smtp_daemon %if 0%{?suse_version} > 1140 +BuildRequires: libHX-devel +BuildRequires: pkgconfig BuildRequires: systemd %{?systemd_requires} %define has_systemd 1 @@ -96,10 +100,10 @@ %patch17 -p1 %patch18 %patch19 - +%patch20 %build rm -fv y.tab.c y.tab.h lex.yy.c lex.yy.o y.tab.o -autoconf +autoreconf -fiv export SENDMAIL=%{_sbindir}/sendmail %configure \ --with-pam \ ++++++ at-parse-suse-sysconfig.patch ++++++ --- atd.c.orig +++ atd.c @@ -104,8 +104,15 @@ static pam_handle_t *pamh = NULL; } #endif +#include <libHX/defs.h> +#include <libHX/map.h> +#include <libHX/option.h> + + /* Local headers */ +#define streq(a, b) (strcmp((a), (b)) == 0) + #include "privs.h" #include "daemon.h" @@ -996,6 +1003,30 @@ main(int argc, char *argv[]) } } + struct HXmap *sysconfigmap; + const struct HXmap_node *node; + struct HXmap_trav *trav; + + sysconfigmap = HX_shconfig_map("/etc/sysconfig/atd"); + + if(sysconfigmap != NULL) + { + trav = HXmap_travinit(sysconfigmap, HXMAP_NOFLAGS); + while ((node = HXmap_traverse(trav)) != NULL) { + if(streq(node->skey, "ATD_BATCH_INTERVAL") && strlen(node->sdata) != 0) { + batch_interval = atoi(node->sdata); + syslog(LOG_INFO, "sysconfig requested batch_interval to be set to %d\n", batch_interval); + } + if(streq(node->skey, "ATD_LOADAVG") && strlen(node->sdata) != 0) { + load_avg = atof(node->sdata); + syslog(LOG_INFO, "sysconfig requested load_avg to be set to %lf\n", load_avg); + } + } + + HXmap_travfree(trav); + HXmap_free(sysconfigmap); + } + namep = argv[0]; if (chdir(ATJOB_DIR) != 0) perr("Cannot change to " ATJOB_DIR); --- configure.in.orig +++ configure.in @@ -1,9 +1,10 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(at.c) +AC_INIT +AC_CONFIG_SRCDIR([at.c]) AC_PREFIX_DEFAULT(/usr) AC_CONFIG_HEADER(config.h) -AC_PREREQ(2.7) +AC_PREREQ([2.69]) VERSION="3.1.8" @@ -39,25 +40,22 @@ case "$host" in ;; esac AC_MSG_CHECKING(Trying to compile a trivial ANSI C program) -AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.), - AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)) +AC_RUN_IFELSE([AC_LANG_SOURCE([[ main(int ac, char **av) { return 0; } ]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)],[AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)]) AC_MSG_CHECKING(__attribute__((noreturn))) -AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ATTRIBUTE_NORETURN), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void __attribute__((noreturn)) panic(void);]])],[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ATTRIBUTE_NORETURN)],[AC_MSG_RESULT(no) +]) dnl Checks for libraries. AC_CHECK_LIB(fl,yywrap, [], - AC_DEFINE(NEED_YYWRAP) + AC_DEFINE([NEED_YYWRAP], 1, [need yywrap]) ) +PKG_CHECK_MODULES([HX], [libHX]) + dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC @@ -67,7 +65,18 @@ AC_CHECK_HEADERS(stdarg.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -AC_TYPE_SIGNAL +AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void. +Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl +AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([#include <sys/types.h> +#include <signal.h> +], + [return *(signal (0, 0)) (0) == 1;])], + [ac_cv_type_signal=int], + [ac_cv_type_signal=void])]) +AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers + (`int' or `void').]) + AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_OFF_T @@ -317,7 +326,7 @@ AC_SUBST(DAEMON_GROUPNAME) AC_ARG_WITH(selinux, [ --with-selinux Define to run with selinux], -AC_DEFINE(WITH_SELINUX), +AC_DEFINE([WITH_SELINUX] , [1], [enable selinux]), ) AC_CHECK_LIB(selinux, is_selinux_enabled, SELINUXLIB=-lselinux) AC_SUBST(SELINUXLIB) @@ -325,9 +334,10 @@ AC_SUBST(WITH_SELINUX) AC_ARG_WITH(pam, [ --with-pam Define to enable pam support ], -AC_DEFINE(WITH_PAM), +AC_DEFINE([WITH_PAM], [1], [with pam]), ) AC_CHECK_LIB(pam, pam_start, PAMLIB='-lpam -lpam_misc') AC_SUBST(PAMLIB) -AC_OUTPUT(Makefile atrun atd.8 atrun.8 at.1 batch) +AC_CONFIG_FILES([Makefile atrun atd.8 atrun.8 at.1 batch]) +AC_OUTPUT --- Makefile.in.orig +++ Makefile.in @@ -31,7 +31,7 @@ SELINUXLIB = @SELINUXLIB@ PAMLIB = @PAMLIB@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ @HX_CFLAGS@ LDFLAGS = @LDFLAGS@ LFILE = $(ATJOB_DIR)/.SEQ DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" \ @@ -39,7 +39,7 @@ DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" -DDAEMON_USERNAME=\"$(DAEMON_USERNAME)\" \ -DDAEMON_GROUPNAME=\"$(DAEMON_GROUPNAME)\" \ -DLFILE=\"$(LFILE)\" -Wall -LIBS = @LIBS@ +LIBS = @LIBS@ @HX_LIBS@ LIBOBJS = @LIBOBJS@ INSTALL = @INSTALL@ ++++++ atd.service ++++++ --- /var/tmp/diff_new_pack.ishM4q/_old 2012-11-30 12:19:51.000000000 +0100 +++ /var/tmp/diff_new_pack.ishM4q/_new 2012-11-30 12:19:51.000000000 +0100 @@ -3,7 +3,7 @@ After=syslog.target [Service] -ExecStart=/bin/bash -c '[ -e /etc/sysconfig/atd ] && . /etc/sysconfig/atd; exec /usr/sbin/atd $${ATD_BATCH_INTERVAL:+-b $$ATD_BATCH_INTERVAL} $${ATD_LOADAVG:+-l $$ATD_LOADAVG}' +ExecStart=/usr/sbin/atd Type=forking [Install] -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org