forked from coreos/portage-stable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move here the unmodified ebuilds from chromiumos-overlay
BUG=none TEST=./setup_board, ./build_packages and ./build_image Change-Id: Ic0a69b603371e0e7b1cfd38602b629752330d3c4 Reviewed-on: http://gerrit.chromium.org/gerrit/6122 Reviewed-by: David James <[email protected]> Tested-by: Diego Elio Pettenò <[email protected]>
- Loading branch information
Diego Elio Pettenò
committed
Aug 25, 2011
1 parent
f7f1f15
commit c0c3b08
Showing
68 changed files
with
4,656 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
# | ||
# This is not a mistake. This shell script (/etc/rmt) has been provided | ||
# for compatibility with other Unix-like systems, some of which have | ||
# utilities that expect to find (and execute) rmt in the /etc directory | ||
# on remote systems. | ||
# | ||
exec /usr/sbin/rmt "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
http://bugs.gentoo.org/252680 | ||
http://lists.gnu.org/archive/html/bug-tar/2008-12/msg00028.html | ||
|
||
revert this change: | ||
|
||
2008-11-25 Sergey Poznyakoff <[email protected]> | ||
|
||
Do not try to drain the input pipe before closing the | ||
archive. | ||
|
||
* src/buffer.c (close_archive): Remove call to | ||
sys_drain_input_pipe. Pass hit_eof as the second | ||
argument to sys_wait_for_child. | ||
* src/common.h (sys_drain_input_pipe): Remove | ||
(sys_wait_for_child): Declare second argument. | ||
* src/system.c (sys_drain_input_pipe): Remove. | ||
(sys_wait_for_child): Take two arguments. The second one helps to | ||
decide whether to tolerate child termination on SIGPIPE. | ||
|
||
diff --git a/src/buffer.c b/src/buffer.c | ||
index 5f5457a..02a3e4c 100644 | ||
--- a/src/buffer.c | ||
+++ b/src/buffer.c | ||
@@ -848,6 +848,8 @@ close_archive (void) | ||
flush_archive (); | ||
} | ||
|
||
+ sys_drain_input_pipe (); | ||
+ | ||
compute_duration (); | ||
if (verify_option) | ||
verify_volume (); | ||
@@ -855,7 +857,7 @@ close_archive (void) | ||
if (rmtclose (archive) != 0) | ||
close_error (*archive_name_cursor); | ||
|
||
- sys_wait_for_child (child_pid, hit_eof); | ||
+ sys_wait_for_child (child_pid); | ||
|
||
tar_stat_destroy (¤t_stat_info); | ||
if (save_name) | ||
diff --git a/src/common.h b/src/common.h | ||
index 9897b46..cc3483e 100644 | ||
--- a/src/common.h | ||
+++ b/src/common.h | ||
@@ -699,7 +699,8 @@ char *xheader_format_name (struct tar_stat_info *st, const char *fmt, | ||
|
||
void sys_detect_dev_null_output (void); | ||
void sys_save_archive_dev_ino (void); | ||
-void sys_wait_for_child (pid_t, bool); | ||
+void sys_drain_input_pipe (void); | ||
+void sys_wait_for_child (pid_t); | ||
void sys_spawn_shell (void); | ||
bool sys_compare_uid (struct stat *a, struct stat *b); | ||
bool sys_compare_gid (struct stat *a, struct stat *b); | ||
diff --git a/src/system.c b/src/system.c | ||
index c90a40d..e57e6da 100644 | ||
--- a/src/system.c | ||
+++ b/src/system.c | ||
@@ -1,7 +1,6 @@ | ||
/* System-dependent calls for tar. | ||
|
||
- Copyright (C) 2003, 2004, 2005, 2006, 2007, | ||
- 2008 Free Software Foundation, Inc. | ||
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | ||
|
||
This program is free software; you can redistribute it and/or modify it | ||
under the terms of the GNU General Public License as published by the | ||
@@ -52,7 +51,12 @@ sys_detect_dev_null_output (void) | ||
} | ||
|
||
void | ||
-sys_wait_for_child (pid_t child_pid, bool eof) | ||
+sys_drain_input_pipe (void) | ||
+{ | ||
+} | ||
+ | ||
+void | ||
+sys_wait_for_child (pid_t child_pid) | ||
{ | ||
} | ||
|
||
@@ -156,8 +160,26 @@ sys_detect_dev_null_output (void) | ||
&& archive_stat.st_ino == dev_null_stat.st_ino)); | ||
} | ||
|
||
+/* Manage to fully drain a pipe we might be reading, so to not break it on | ||
+ the producer after the EOF block. FIXME: one of these days, GNU tar | ||
+ might become clever enough to just stop working, once there is no more | ||
+ work to do, we might have to revise this area in such time. */ | ||
+ | ||
+void | ||
+sys_drain_input_pipe (void) | ||
+{ | ||
+ size_t r; | ||
+ | ||
+ if (access_mode == ACCESS_READ | ||
+ && ! _isrmt (archive) | ||
+ && (S_ISFIFO (archive_stat.st_mode) || S_ISSOCK (archive_stat.st_mode))) | ||
+ while ((r = rmtread (archive, record_start->buffer, record_size)) != 0 | ||
+ && r != SAFE_READ_ERROR) | ||
+ continue; | ||
+} | ||
+ | ||
void | ||
-sys_wait_for_child (pid_t child_pid, bool eof) | ||
+sys_wait_for_child (pid_t child_pid) | ||
{ | ||
if (child_pid) | ||
{ | ||
@@ -171,11 +193,8 @@ sys_wait_for_child (pid_t child_pid, bool eof) | ||
} | ||
|
||
if (WIFSIGNALED (wait_status)) | ||
- { | ||
- int sig = WTERMSIG (wait_status); | ||
- if (!(!eof && sig == SIGPIPE)) | ||
- ERROR ((0, 0, _("Child died with signal %d"), sig)); | ||
- } | ||
+ ERROR ((0, 0, _("Child died with signal %d"), | ||
+ WTERMSIG (wait_status))); | ||
else if (WEXITSTATUS (wait_status) != 0) | ||
ERROR ((0, 0, _("Child returned status %d"), | ||
WEXITSTATUS (wait_status))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
https://bugs.gentoo.org/show_bug.cgi?id=253122 | ||
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=7b68ef3d918603f3afb03e939ba72f5cad10edf4 | ||
|
||
From 7b68ef3d918603f3afb03e939ba72f5cad10edf4 Mon Sep 17 00:00:00 2001 | ||
From: Sergey Poznyakoff <[email protected]> | ||
Date: Mon, 29 Dec 2008 09:27:00 +0000 | ||
Subject: Fix testsuite and bootstrap. Implement -I. | ||
|
||
* bootstrap.conf: Include size_max. | ||
* gnulib.modules: Remove memset, rmdir. Replace strdup with | ||
strdup-posix. Patch by Eric Blake. | ||
* src/tar.c: Implement -I as a shorthand for --use-compress-program. | ||
* doc/tar.texi: Document -I. | ||
* tests/pipe.at, tests/shortrec.at: Account for eventual 'Record | ||
size' output. | ||
* tests/testsuite.at (AT_TAR_CHECK_HOOK): New define | ||
(AT_TAR_WITH_HOOK, TAR_IGNREC_HOOK): New macros. | ||
--- | ||
diff --git a/tests/pipe.at b/tests/pipe.at | ||
index efca65b..be99212 100644 | ||
--- a/tests/pipe.at | ||
+++ b/tests/pipe.at | ||
@@ -1,7 +1,7 @@ | ||
# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
|
||
# Test suite for GNU tar. | ||
-# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | ||
+# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
@@ -30,7 +30,8 @@ AT_SETUP([decompressing from stdin]) | ||
|
||
AT_KEYWORDS([pipe]) | ||
|
||
-AT_TAR_CHECK([ | ||
+AT_TAR_WITH_HOOK([TAR_IGNREC_HOOK], | ||
+[AT_TAR_CHECK([ | ||
AT_SORT_PREREQ | ||
|
||
mkdir directory | ||
@@ -49,6 +50,7 @@ directory/file1 | ||
directory/file2 | ||
separator | ||
separator | ||
-]) | ||
+], | ||
+[stderr])]) | ||
|
||
AT_CLEANUP | ||
diff --git a/tests/shortrec.at b/tests/shortrec.at | ||
index 3e009fd..179f365 100644 | ||
--- a/tests/shortrec.at | ||
+++ b/tests/shortrec.at | ||
@@ -1,7 +1,7 @@ | ||
# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
|
||
# Test suite for GNU tar. | ||
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc. | ||
+# Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc. | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
@@ -23,17 +23,22 @@ | ||
# used to create the archive. | ||
|
||
AT_SETUP([short records]) | ||
-AT_KEYWORDS([shortrec.at]) | ||
+AT_KEYWORDS([shortrec]) | ||
|
||
-AT_TAR_CHECK([ | ||
+AT_TAR_WITH_HOOK([TAR_IGNREC_HOOK], | ||
+[AT_TAR_CHECK([ | ||
mkdir directory | ||
(cd directory && touch a b c d e f g h i j k l m n o p q r) | ||
-tar -c -b 1 -f - directory | tar -t -f - >/dev/null | ||
+tar -c -b 1 -f - directory | tar -t -f - | ||
tar -c -b 1 -f archive directory | ||
-tar -t -f archive >/dev/null | ||
-tar -t -f - < archive >/dev/null | ||
+tar -t -f archive | ||
+tar -t -f - < archive | ||
|
||
rm -r directory | ||
+], | ||
+[0], | ||
+[ignore], | ||
+[stderr]) | ||
]) | ||
|
||
AT_CLEANUP | ||
diff --git a/tests/testsuite.at b/tests/testsuite.at | ||
index 2fa5392..a12477d 100644 | ||
--- a/tests/testsuite.at | ||
+++ b/tests/testsuite.at | ||
@@ -1,7 +1,7 @@ | ||
# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
|
||
# Test suite for GNU tar. | ||
-# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | ||
+# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
@@ -21,6 +21,7 @@ | ||
# We need a recent Autotest. | ||
m4_version_prereq([2.52g]) | ||
|
||
+m4_define([AT_TAR_CHECK_HOOK]) | ||
m4_define([AT_TAR_CHECK],[ | ||
AT_XFAIL_IF(test -f $[]XFAILFILE) | ||
m4_foreach([FMT], | ||
@@ -33,9 +34,20 @@ export TEST_TAR_FORMAT | ||
TAR_OPTIONS="-H FMT" | ||
export TAR_OPTIONS | ||
rm -rf * | ||
-$1)],$2,$3,$4,$5,$6)]) | ||
+$1)],$2,$3,$4,$5,$6) | ||
+ AT_TAR_CHECK_HOOK]) | ||
]) | ||
|
||
+m4_define([AT_TAR_WITH_HOOK],[ | ||
+ m4_pushdef([AT_TAR_CHECK_HOOK],[$1]) | ||
+ $2 | ||
+ | ||
+ m4_popdef([AT_TAR_CHECK_HOOK])]) | ||
+ | ||
+m4_define([TAR_IGNREC_HOOK],[ | ||
+ AT_CHECK([grep -v '^.*tar: Record size = ' stderr; exit 0]) | ||
+]) | ||
+ | ||
m4_define([RE_CHECK],[ | ||
AT_DATA([$1.re],[$2]) | ||
awk '{print NR " " $[]0}' $1 > $[]$.1 | ||
-- | ||
cgit v0.8.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff -uNr tar-1.22.ORIG//src/create.c tar-1.22/src/create.c | ||
--- tar-1.22.ORIG//src/create.c 2010-04-25 19:50:28.147606290 +0100 | ||
+++ tar-1.22/src/create.c 2010-04-25 19:50:44.849606051 +0100 | ||
@@ -577,7 +577,10 @@ | ||
GNAME_TO_CHARS (tmpname, header->header.gname); | ||
free (tmpname); | ||
|
||
- strcpy (header->header.magic, OLDGNU_MAGIC); | ||
+ /* OLDGNU_MAGIC is string with 7 chars + NULL */ | ||
+ strncpy (header->header.magic, OLDGNU_MAGIC, sizeof(header->header.magic)); | ||
+ strncpy (header->header.version, OLDGNU_MAGIC+sizeof(header->header.magic), | ||
+ sizeof(header->header.version)); | ||
header->header.typeflag = type; | ||
finish_header (st, header, -1); | ||
|
||
@@ -907,9 +910,13 @@ | ||
break; | ||
|
||
case OLDGNU_FORMAT: | ||
- case GNU_FORMAT: /*FIXME?*/ | ||
- /* Overwrite header->header.magic and header.version in one blow. */ | ||
- strcpy (header->header.magic, OLDGNU_MAGIC); | ||
+ case GNU_FORMAT: | ||
+ /* OLDGNU_MAGIC is string with 7 chars + NULL */ | ||
+ strncpy (header->header.magic, OLDGNU_MAGIC, | ||
+ sizeof(header->header.magic)); | ||
+ strncpy (header->header.version, | ||
+ OLDGNU_MAGIC+sizeof(header->header.magic), | ||
+ sizeof(header->header.version)); | ||
break; | ||
|
||
case POSIX_FORMAT: |
Oops, something went wrong.