diff --git a/startpar-0.52.dif b/startpar-0.52.dif index 31cd184..27807ec 100644 --- a/startpar-0.52.dif +++ b/startpar-0.52.dif @@ -1,5 +1,5 @@ --- makeboot.c -+++ makeboot.c 2009/02/05 23:36:16 ++++ makeboot.c 2009-02-06 14:42:41.492201093 +0100 @@ -13,6 +13,12 @@ #include #include @@ -13,7 +13,7 @@ int tree_entries = 0; -@@ -95,6 +101,7 @@ +@@ -95,6 +101,7 @@ static struct makelist *new_list(struct /* * check whether the given target would create an infinte loop */ @@ -21,7 +21,7 @@ static int check_loop(struct makenode *dep, struct makenode *src) { struct makelist *s; -@@ -103,6 +110,8 @@ +@@ -103,6 +110,8 @@ static int check_loop(struct makenode *d fprintf(stderr, "loop exists %s in %s!\n", dep->name, src->name); return 1; } @@ -30,7 +30,7 @@ if (check_loop(s->node, src)) return 1; } -@@ -117,6 +126,7 @@ +@@ -117,6 +126,7 @@ static void add_depend(struct makenode * struct makenode *dep; dep = add_target(dst); @@ -38,7 +38,7 @@ if (check_loop(dep, node)) return; dep->select = new_list(node, dep->select); -@@ -158,11 +168,28 @@ +@@ -158,11 +168,28 @@ void parse_makefile(const char *path) char *s, *strp, *p; struct makenode *node; @@ -69,7 +69,7 @@ while (fgets(buf, sizeof(buf), fp)) { for (s = buf; *s && isspace(*s); s++) ; -@@ -198,6 +225,11 @@ +@@ -198,6 +225,11 @@ void parse_makefile(const char *path) } } } @@ -81,7 +81,7 @@ fclose(fp); for (node = tree_list; node; node = node->next) { -@@ -234,7 +266,17 @@ +@@ -234,7 +266,17 @@ static void filter_files(const char *dir filter_prefix = prefix; snprintf(path, sizeof(path), "/etc/init.d/%s.d", dir); @@ -99,7 +99,7 @@ /* mark all matching nodes */ for (i = 0; i < ndirs; i++) { t = lookup_target(dirlist[i]->d_name + 3); -@@ -342,6 +384,17 @@ +@@ -342,6 +384,17 @@ struct makenode *pickup_task(void) } } if (best) { @@ -117,7 +117,7 @@ blogger("service %s", best->name); best->status = T_RUNNING; } -@@ -359,6 +412,17 @@ +@@ -359,6 +412,17 @@ void finish_task(struct makenode *node) return; for (n = node->select; n; n = n->next) n->node->num_deps--; diff --git a/sysvinit-2.86-full-time.patch b/sysvinit-2.86-full-time.patch index 9582b28..e79f2e1 100644 --- a/sysvinit-2.86-full-time.patch +++ b/sysvinit-2.86-full-time.patch @@ -4,7 +4,7 @@ Index: man/last.1 =================================================================== ---- man/last.1.orig 2005-12-05 18:05:40.000000000 +0100 +--- man/last.1 2005-12-05 18:05:40.000000000 +0100 +++ man/last.1 2005-12-05 18:09:27.000000000 +0100 @@ -12,7 +12,7 @@ last, lastb \- show listing of last logg .RB [ \-R ] @@ -35,9 +35,9 @@ Index: man/last.1 host, but it displays the IP number in numbers-and-dots notation. Index: src/last.c =================================================================== ---- src/last.c.orig 2005-12-05 18:07:21.000000000 +0100 -+++ src/last.c 2005-12-05 18:09:53.000000000 +0100 -@@ -70,6 +70,7 @@ int showhost = 1; /* Show hostname too? +--- src/last.c 2005-12-05 18:07:21.000000000 +0100 ++++ src/last.c 2009-02-20 16:37:27.380797018 +0100 +@@ -70,6 +70,7 @@ int showhost = 1; /* Show hostname too? int altlist = 0; /* Show hostname at the end. */ int usedns = 0; /* Use DNS to lookup the hostname. */ int useip = 0; /* Print IP address in number format */ @@ -88,19 +88,22 @@ Index: src/last.c break; case R_REBOOT: logouttime[0] = 0; /* Print machine uptime */ -@@ -451,18 +464,23 @@ int list(struct utmp *p, time_t t, int w +@@ -450,23 +463,30 @@ int list(struct utmp *p, time_t t, int w + strcmp(s + 1, domainname) == 0) *s = 0; #endif if (!altlist) { - snprintf(final, sizeof(final), +- snprintf(final, sizeof(final), - "%-8.8s %-12.12s %-16.16s " - "%-16.16s %-7.7s %-12.12s\n", ++ len = snprintf(final, sizeof(final), + fulltime ? + "%-8.8s %-12.12s %-16.16s %-24.24s %-26.26s %-12.12s\n" : + "%-8.8s %-12.12s %-16.16s %-16.16s %-7.7s %-12.12s\n", p->ut_name, utline, domain, logintime, logouttime, length); } else { - snprintf(final, sizeof(final), +- snprintf(final, sizeof(final), ++ len = snprintf(final, sizeof(final), + fulltime ? + "%-8.8s %-12.12s %-24.24s %-26.26s %-12.12s %s\n" : "%-8.8s %-12.12s %-16.16s %-7.7s %-12.12s %s\n", @@ -108,13 +111,30 @@ Index: src/last.c logintime, logouttime, length, domain); } } else - snprintf(final, sizeof(final), +- snprintf(final, sizeof(final), ++ len = snprintf(final, sizeof(final), + fulltime ? + "%-8.8s %-12.12s %-24.24s %-26.26s %-12.12s\n" : "%-8.8s %-12.12s %-16.16s %-7.7s %-12.12s\n", p->ut_name, utline, logintime, logouttime, length); -@@ -492,7 +510,7 @@ void usage(char *s) + ++ final[sizeof(final)-1] = '\0'; ++ + /* + * Print out "final" string safely. + */ +@@ -477,6 +497,9 @@ int list(struct utmp *p, time_t t, int w + putchar('*'); + } + ++ if (len < 0 || len >= sizeof(final)) ++ putchar('\n'); ++ + recsdone++; + if (maxrecs && recsdone >= maxrecs) + return 1; +@@ -492,7 +515,7 @@ void usage(char *s) { fprintf(stderr, "Usage: %s [-num | -n num] [-f file] " "[-t YYYYMMDDHHMMSS] " @@ -123,7 +143,7 @@ Index: src/last.c "[username..] [tty..]\n", s); exit(1); -@@ -563,7 +581,7 @@ int main(int argc, char **argv) +@@ -563,7 +586,7 @@ int main(int argc, char **argv) progname = mybasename(argv[0]); /* Process the arguments. */ @@ -132,7 +152,7 @@ Index: src/last.c switch(c) { case 'R': showhost = 0; -@@ -594,6 +612,9 @@ int main(int argc, char **argv) +@@ -594,6 +617,9 @@ int main(int argc, char **argv) case 'a': altlist++; break; diff --git a/sysvinit.changes b/sysvinit.changes index c92b59a..abd7ca2 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 20 16:08:33 CET 200 - werner@suse.de + +- make sure that newline is printed out for last(1) (bnc#471386) + ------------------------------------------------------------------- Thu Feb 12 14:53:14 CET 2009 - coolo@suse.de diff --git a/sysvinit.spec b/sysvinit.spec index f3f4596..452a98b 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -30,7 +30,7 @@ Group: System/Base PreReq: coreutils AutoReqProv: on Version: 2.86 -Release: 194 +Release: 196 Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libselinux-devel libsepol-devel @@ -323,6 +323,8 @@ rm -rf ${RPM_BUILD_ROOT} %doc %{_mandir}/man8/mkill.8.gz %changelog +* Fri Feb 20 2009 werner@suse.de +- make sure that newline is printed out for last(1) (bnc#471386) * Thu Feb 12 2009 coolo@suse.de - support preload in its job in giving it the init scripts to preload - don't wait 0.3s when we need only 0.03