[Frugalware-darcs] frugalware-current: coreutils-6.4-1-i686
VMiklos
vmiklos at frugalware.org
Fri Oct 27 18:49:32 CEST 2006
Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=frugalware-current;a=darcs_commitdiff;h=20061027164426-e2957-2702b280910d56028f83b4cb33008ffa1420010a.gz;
[coreutils-6.4-1-i686
VMiklos <vmiklos at frugalware.org>**20061027164426
version bump, using ac_cv_func_openat=no
this way it's compatible with fakeroot
] {
hunk ./source/base/coreutils/FrugalBuild 5
-pkgver=5.2.1
-pkgrel=9
+pkgver=6.4
+pkgrel=1
hunk ./source/base/coreutils/FrugalBuild 12
-# 6.4 is not compatible with fakeroot
-up2date="lynx -dump http://ftp.gnu.org/pub/gnu/coreutils|grep coreutils-.*bz2$|grep -v '\.9[0-9]'|sed -n 's/.*-\(.*\)\.t.*/\1/;s/6.4/5.2.1/;$ p'"
+up2date="lynx -dump http://ftp.gnu.org/pub/gnu/coreutils|grep coreutils-.*bz2$|grep -v '\.9[0-9]'|sed -n 's/.*-\(.*\)\.t.*/\1/;$ p'"
hunk ./source/base/coreutils/FrugalBuild 14
- dircolors.1 dircolors.c dircolors.h DIR_COLORS \
- coreutils-5.2.1-progress-bar.patch)
-options=('force')
-sha1sums=('7d8a29c9b93c66f4702ccd2b462336d499533c6d' \
- '26dd736f88eb23687373047b2da90f2eded46d67' \
- '0859ca37c7a2a393fb083384522e294f5c72a043' \
- 'e4439c68b5b50fa07ab8f1c15c7c877d343c57ae' \
- '2d4c8bdbc82d310f9a4cdf2d161625c745b8dbda' \
- '485b0da3bf1579ab18304b385665b308e131c42a')
-
-[ "$CARCH" != "ppc" ] && \
- source=(${source[@]} $pkgname-$pkgver-uname-3.patch) && \
- sha1sums=(${sha1sums[@]} '8bc8080e4e914ce048eccb55a8150943f3fba9eb')
+ dircolors.1 dircolors.c dircolors.h DIR_COLORS)
+signatures=($source.sig '' '' '' '')
hunk ./source/base/coreutils/FrugalBuild 23
- --enable-largefile
+ --enable-largefile ac_cv_func_openat=no
hunk ./source/base/coreutils/coreutils-5.2.1-progress-bar.patch 1
-diff -urN coreutils-5.2.0.orig/src/copy.c coreutils-5.2.0/src/copy.c
---- coreutils-5.2.0.orig/src/copy.c 2004-02-07 07:42:04.000000000 -0800
-+++ coreutils-5.2.0/src/copy.c 2004-02-21 14:37:38.000000000 -0800
-@@ -17,6 +17,8 @@
-
- /* Extracted from cp.c and librarified by Jim Meyering. */
-
-+/* Progress bar support added by Miika Pekkarinen. miipekk at ihme.org */
-+
- #include <config.h>
- #include <stdio.h>
- #include <assert.h>
-@@ -26,6 +28,10 @@
- # include <hurd.h>
- #endif
-
-+#ifdef GWINSZ_IN_SYS_IOCTL
-+# include <sys/ioctl.h>
-+#endif
-+
- #include "system.h"
- #include "backupfile.h"
- #include "copy.h"
-@@ -41,3 +47,4 @@
- #include "savedir.h"
- #include "utimens.h"
-+#include "xstrtol.h"
- #include "xreadlink.h"
-@@ -76,6 +83,9 @@
- /* Initial size of the above hash table. */
- #define DEST_INFO_INITIAL_CAPACITY 61
-
-+/* How many samples to take while calculating average speed */
-+#define SAMPLE_MAX 10
-+
- int euidaccess ();
- int yesno ();
-
-@@ -188,6 +198,62 @@
- return -ret;
- }
-
-+/* Shorten a string '/long path/long file' to 'long fi...'
-+ Also adds padding bytes to end of the string if necessary */
-+char *shorten_path(const char *str, int max_width)
-+{
-+ char *shortname;
-+ char *filename = (char *) (rindex(str, '/'));
-+ int len;
-+
-+ if (filename == NULL)
-+ {
-+ filename = (char *) str;
-+ }
-+ else
-+ {
-+ filename = (char *) &filename[1];
-+ }
-+
-+ len = strlen(filename);
-+ shortname = (char *) xmalloc (max_width + 1);
-+ strncpy (shortname, filename, max_width);
-+ shortname[max_width] = '\0';
-+ if (len > max_width)
-+ {
-+ memset(&shortname[max_width - 3], '.', 3);
-+ }
-+ else
-+ {
-+ memset(&shortname[len], ' ', max_width - len);
-+ }
-+
-+ return shortname;
-+}
-+
-+char *si_units(off_t size)
-+{
-+ const static int buf_size = 20;
-+ char *buf;
-+ static char *unit_array[] = { "B", "KiB", "MiB", "GiB", "" };
-+ int i;
-+
-+ buf = xmalloc(20);
-+ for (i = 0; size > 10000; i++)
-+ {
-+ if (unit_array[i][0] == '\0')
-+ {
-+ i--;
-+ break;
-+ }
-+ size /= 1024;
-+ }
-+
-+ snprintf (buf, buf_size, "%lu %s", (unsigned long)size, unit_array[i]);
-+
-+ return buf;
-+}
-+
- /* Copy a regular file from SRC_PATH to DST_PATH.
- If the source file contains holes, copies holes and blocks of zeros
- in the source file as holes in the destination file.
-@@ -215,6 +281,19 @@
- off_t n_read_total = 0;
- int last_write_made_hole = 0;
- int make_holes = 0;
-+ time_t t_start;
-+ time_t t_last;
-+ time_t t_now;
-+ int last_bytes = 0;
-+ int progress_bar_printed = 0;
-+ char *shortname = NULL;
-+ off_t sample_window[SAMPLE_MAX];
-+ off_t sample_sum = 0;
-+ int sample_count = 0;
-+ int line_length = 80;
-+#ifdef TIOCGWINSZ
-+ struct winsize ws;
-+#endif
-
- source_desc = open (src_path, O_RDONLY);
- if (source_desc < 0)
-@@ -312,6 +391,9 @@
-
- buf = alloca (buf_size + sizeof (int));
-
-+ time (&t_start);
-+ t_last = t_start;
-+
- for (;;)
- {
- ssize_t n_read = read (source_desc, buf, buf_size);
-@@ -376,6 +458,113 @@
- }
- last_write_made_hole = 0;
- }
-+
-+ time (&t_now);
-+
-+ /* Progress bar stuff */
-+ if (! x->pbar_show || t_now - t_start < x->pbar_delay)
-+ {
-+ continue;
-+ }
-+
-+ if (! progress_bar_printed)
-+ {
-+ /* Column width check code copied from ls.c */
-+ char const *p = getenv ("COLUMNS");
-+ if (p && *p)
-+ {
-+ long int tmp_long;
-+ if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
-+ && 0 < tmp_long && tmp_long <= INT_MAX)
-+ {
-+ line_length = (int) tmp_long;
-+ }
-+ else
-+ {
-+ error (0, 0,
-+ _("ignoring invalid width in environment \
-+ variable COLUMNS: %s"),
-+ quotearg (p));
-+ }
-+ }
-+
-+#ifdef TIOCGWINSZ
-+ if (ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws) != -1 && ws.ws_col != 0)
-+ {
-+ line_length = ws.ws_col;
-+ }
-+#endif
-+ if (line_length < 50)
-+ {
-+ continue;
-+ }
-+
-+ /* Take a short filename for progress bar */
-+ shortname = shorten_path(src_path, line_length - 48);
-+ progress_bar_printed = 1;
-+ }
-+
-+ if (t_now == t_last)
-+ {
-+ continue;
-+ }
-+
-+ if (sample_count == SAMPLE_MAX)
-+ {
-+ int i;
-+
-+ sample_sum -= sample_window[0];
-+ for (i = 0; i < SAMPLE_MAX - 1; i++)
-+ {
-+ sample_window[i] = sample_window[i + 1];
-+ }
-+ }
-+ else
-+ {
-+ sample_count++;
-+ }
-+
-+ {
-+ char *str_size;
-+ char *str_speed;
-+ char etabuf[64];
-+ time_t t_temp;
-+
-+ sample_window[sample_count - 1] = (n_read_total - last_bytes) /
-+ (t_now - t_last);
-+ sample_sum += sample_window[sample_count - 1];
-+
-+ /* Calculate the remaining time */
-+ t_temp = (src_open_sb.st_size - n_read_total) / (sample_sum / sample_count);
-+
-+ /* Don't print the progress bar if the estimated remaining
-+ time is low. */
-+ if (progress_bar_printed == 1 && t_temp < x->pbar_min_est)
-+ {
-+ continue;
-+ }
-+ progress_bar_printed = 2;
-+
-+ str_size = si_units(src_open_sb.st_size);
-+ str_speed = si_units(sample_sum / sample_count);
-+
-+ strftime(etabuf, sizeof etabuf, "%H:%M.%S",
-+ gmtime(&t_temp));
-+ printf (_("%s | %3d%% | %9s | %9s/s | ETA %s\r"), shortname,
-+ (int)(n_read_total * 100 / src_open_sb.st_size),
-+ str_size, str_speed, etabuf);
-+ fflush (stdout);
-+ free(str_size);
-+ free(str_speed);
-+ t_last = t_now;
-+ last_bytes = n_read_total;
-+ }
-+ }
-+
-+ /* Print a newline if progress bar is enabled and has been shown */
-+ if (progress_bar_printed == 2)
-+ {
-+ printf ("%s | 100%%\n", shortname);
- }
-
- /* If the file ends with a `hole', something needs to be written at
-@@ -412,6 +601,11 @@
- return_val = -1;
- }
-
-+ if (shortname != NULL)
-+ {
-+ free (shortname);
-+ }
-+
- return return_val;
- }
-
-diff -urN coreutils-5.2.0.orig/src/copy.h coreutils-5.2.0/src/copy.h
---- coreutils-5.2.0.orig/src/copy.h 2004-02-07 08:00:59.000000000 -0800
-+++ coreutils-5.2.0/src/copy.h 2004-02-21 14:41:30.000000000 -0800
-@@ -153,6 +153,15 @@
- /* If nonzero, display the names of the files before copying them. */
- int verbose;
-
-+ /* If nonzero, display a progress bar when the following conditions are met:
-+ - pbar_delay defines how many seconds to wait before considering to
-+ display the progress bar
-+ - pbar_min_est defines how many seconds estimated operation complete
-+ time should be at least to show the progress bar. */
-+ int pbar_show;
-+ int pbar_delay;
-+ int pbar_min_est;
-+
- /* If nonzero, stdin is a tty. */
- int stdin_tty;
-
-diff -urN coreutils-5.2.0.orig/src/cp.c coreutils-5.2.0/src/cp.c
---- coreutils-5.2.0.orig/src/cp.c 2004-02-21 14:43:39.000000000 -0800
-+++ coreutils-5.2.0/src/cp.c 2004-02-21 14:37:38.000000000 -0800
-@@ -84,6 +84,14 @@
- /* Initial number of entries in the inode hash table. */
- #define INITIAL_ENTRY_TAB_SIZE 70
-
-+/* Initial settings for progress bar when it's enabled.
-+ PROGRESS_DELAY defines how many seconds to wait before even
-+ considering to display a proggress bar.
-+ PROGRESS_MIN_EST defines how many seconds estimated operation
-+ complete time should be at least to show the progress bar. */
-+#define PROGRESS_DELAY 1
-+#define PROGRESS_MIN_EST 1
-+
- /* The invocation name of this program. */
- char *program_name;
-
-@@ -123,6 +131,7 @@
- {"copy-contents", no_argument, NULL, COPY_CONTENTS_OPTION},
- {"dereference", no_argument, NULL, 'L'},
- {"force", no_argument, NULL, 'f'},
-+ {"progress", no_argument, NULL, 'g'},
- {"interactive", no_argument, NULL, 'i'},
- {"link", no_argument, NULL, 'l'},
- {"no-dereference", no_argument, NULL, 'P'},
-@@ -179,6 +188,8 @@
- --no-dereference never follow symbolic links\n\
- -f, --force if an existing destination file cannot be\n\
- opened, remove it and try again\n\
-+ -g, --progress show a progress bar if operation is going to\n\
-+ take a long time\n\
- -i, --interactive prompt before overwrite\n\
- -H follow command-line symbolic links\n\
- "), stdout);
-@@ -739,6 +750,11 @@
-
- x->update = 0;
- x->verbose = 0;
-+
-+ x->pbar_show = 0;
-+ x->pbar_delay = PROGRESS_DELAY;
-+ x->pbar_min_est = PROGRESS_MIN_EST;
-+
- x->dest_info = NULL;
- x->src_info = NULL;
- }
-@@ -844,7 +860,7 @@
- we'll actually use backup_suffix_string. */
- backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
-
-- while ((c = getopt_long (argc, argv, "abdfHilLprsuvxPRS:V:", long_opts, NULL))
-+ while ((c = getopt_long (argc, argv, "abdfgHilLprsuvxPRS:V:", long_opts, NULL))
- != -1)
- {
- switch (c)
-@@ -893,6 +909,10 @@
- x.interactive = 0;
- x.unlink_dest_after_failed_open = 1;
- break;
-+
-+ case 'g':
-+ x.pbar_show = 1;
-+ break;
-
- case 'H':
- x.dereference = DEREF_COMMAND_LINE_ARGUMENTS;
-diff -urN coreutils-5.2.0.orig/src/mv.c coreutils-5.2.0/src/mv.c
---- coreutils-5.2.0.orig/src/mv.c 2004-02-07 07:41:02.000000000 -0800
-+++ coreutils-5.2.0/src/mv.c 2004-02-21 14:42:33.000000000 -0800
-@@ -45,6 +45,14 @@
- /* Initial number of entries in the inode hash table. */
- #define INITIAL_ENTRY_TAB_SIZE 70
-
-+/* Initial settings for progress bar when it's enabled.
-+ PROGRESS_DELAY defines how many seconds to wait before even
-+ considering to display a proggress bar.
-+ PROGRESS_MIN_EST defines how many seconds estimated operation
-+ complete time should be at least to show the progress bar. */
-+#define PROGRESS_DELAY 1
-+#define PROGRESS_MIN_EST 1
-+
- /* For long options that have no equivalent short option, use a
- non-character as a pseudo short option, starting with CHAR_MAX + 1. */
- enum
-@@ -79,6 +87,7 @@
- {
- {"backup", optional_argument, NULL, 'b'},
- {"force", no_argument, NULL, 'f'},
-+ {"progress", no_argument, NULL, 'g'},
- {"interactive", no_argument, NULL, 'i'},
- {"reply", required_argument, NULL, REPLY_OPTION},
- {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
-@@ -140,6 +149,10 @@
-
- x->update = 0;
- x->verbose = 0;
-+ x->pbar_show = 0;
-+ x->pbar_delay = PROGRESS_DELAY;
-+ x->pbar_min_est = PROGRESS_MIN_EST;
-+
- x->dest_info = NULL;
- x->src_info = NULL;
- }
-@@ -320,6 +333,8 @@
- -b like --backup but does not accept an argument\n\
- -f, --force do not prompt before overwriting\n\
- (equivalent to --reply=yes)\n\
-+ -g, --progress show a progress bar if operation is going to\n\
-+ take a long time\n\
- -i, --interactive prompt before overwrite\n\
- (equivalent to --reply=query)\n\
- "), stdout);
-@@ -363,6 +378,9 @@
- int c;
- int errors;
- int make_backups = 0;
-+ int pbar_show = 0;
-+ int pbar_delay = PROGRESS_DELAY;
-+ int pbar_min_est = PROGRESS_MIN_EST;
- int dest_is_dir;
- char *backup_suffix_string;
- char *version_control_string = NULL;
-@@ -388,7 +406,7 @@
-
- errors = 0;
-
-- while ((c = getopt_long (argc, argv, "bfiuvS:V:", long_options, NULL)) != -1)
-+ while ((c = getopt_long (argc, argv, "bfgiuvS:V:", long_options, NULL)) != -1)
- {
- switch (c)
- {
-@@ -410,6 +428,9 @@
- case 'f':
- x.interactive = I_ALWAYS_YES;
- break;
-+ case 'g':
-+ x.pbar_show = 1;
-+ break;
- case 'i':
- x.interactive = I_ASK_USER;
- break;
rmfile ./source/base/coreutils/coreutils-5.2.1-progress-bar.patch
hunk ./source/base/coreutils/coreutils-5.2.1-uname-3.patch 1
-Submitted By: Robert Connolly <robert at linuxfromscratch.org> (ashes)
-Date: 2005-03-07
-Initial Package Version: 5.2.1
-Upstream Status: pending
-Origin: Scot McPherson and Zack Winkles
-Description: Fix the output of uname once and for all.
-
- $ uname -m # This always worked.
- i686
- $ uname -i # Used to report 'unknown'.
- i386
- $ uname -p # Likewise.
- athlon-4
-
-Now 'uname -p' can be used by GCC's mtune/mcpu and march options. For example:
-
- CFLAGS="-march=$(uname -m) -mtune=$(uname -p)"
-
-diff -Naur coreutils-5.2.1.orig/src/uname.c coreutils-5.2.1/src/uname.c
---- coreutils-5.2.1.orig/src/uname.c 2004-01-21 22:27:02.000000000 +0000
-+++ coreutils-5.2.1/src/uname.c 2005-03-07 22:23:17.659010480 +0000
-@@ -29,6 +29,26 @@
- # include <sys/systeminfo.h>
- #endif
-
-+#ifdef linux
-+/* Thanks to the ffmpeg team for this PIC version of cpuid() */
-+#ifdef ARCH_X86_64
-+# define REG_b "rbx"
-+# define REG_S "rsi"
-+#else
-+# define REG_b "ebx"
-+# define REG_S "esi"
-+#endif
-+#define cpuid(index,eax,ebx,ecx,edx)\
-+ __asm __volatile\
-+ ("mov %%"REG_b", %%"REG_S"\n\t"\
-+ "cpuid\n\t"\
-+ "xchg %%"REG_b", %%"REG_S\
-+ : "=a" (eax), "=S" (ebx),\
-+ "=c" (ecx), "=d" (edx)\
-+ : "0" (index));
-+int has_sse( void );
-+#endif
-+
- #if HAVE_SYSCTL && HAVE_SYS_SYSCTL_H
- # include <sys/param.h> /* needed for OpenBSD 3.0 */
- # include <sys/sysctl.h>
-@@ -249,6 +269,99 @@
- if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
- element = processor;
- }
-+#else
-+ {
-+ struct utsname u;
-+ uname (&u);
-+ element = u.machine;
-+#ifdef linux
-+/******************************************************************************
-+ *
-+ * Hello, major hack. I shouldn't have to do this. struct utsname should
-+ * have another element with this info in it. There's probably a struct
-+ * somewhere that has this info, I just don't know where it is.
-+ *
-+ *****************************************************************************/
-+
-+ if( !strcmp( element, "i586" ) || !strcmp( element, "i686" ) ) {
-+ int eax, ebx, ecx, edx, unused;
-+ int model, family, sse;
-+
-+ cpuid(0,unused,ebx,ecx,edx);
-+ cpuid(1,eax,unused,unused,unused);
-+ model = (eax >> 4) & 0xf;
-+ family = (eax >> 8) & 0xf;
-+
-+ switch(ebx) {
-+ case 0x756e6547: // Intel
-+ switch( family ) {
-+ case 5: // Pentium
-+ if( model <= 3 )
-+ element="pentium";
-+ if( model > 3 )
-+ element="pentium-mmx";
-+ break;
-+ case 6: // PentiumPro - Pentium III
-+ if( model == 1 ) // Pentium Pro
-+ element="pentiumpro";
-+ if( ( model == 3 ) || ( model == 5 ) ||
-+ ( model == 6 ) ) // Pentium II
-+ element="pentium2";
-+ if( ( model == 7 ) || ( model == 8 ) ||
-+ ( model == 10 ) || ( model == 11 ) ) // These are all Pentium III
-+ element="pentium3";
-+ break;
-+ case 15: // Pentium4
-+ if( model == 3 ) // Prescott
-+ element="prescott";
-+ else
-+ element="pentium4";
-+ break;
-+ default:
-+ break;
-+ } // end switch( family )
-+ break;
-+ case 0x68747541: // AMD
-+ switch(family) {
-+ case 5:
-+ if( ( model == 0 ) || ( model == 1 ) ||
-+ ( model == 2 ) || ( model == 3 ) ) // K5
-+ element="i586";
-+ if( ( model == 6 ) || ( model == 7 ) ) // K6
-+ element="k6";
-+ if( model == 8 ) // K6-2
-+ element="k6-2";
-+ if( model == 9 ) // K6-3
-+ element="k6-3";
-+ break;
-+ case 6:
-+ if( model <= 4 )
-+ element="athlon";
-+ if( model > 4 ) {
-+ sse = has_sse();
-+ if( sse == 0 )
-+ element="athlon";
-+ if( sse == 1 )
-+ element="athlon-4";
-+ }
-+ break;
-+ case 15:
-+ element="athlon-4";
-+ break;
-+ default:
-+ break;
-+ } // end switch( family )
-+ break;
-+ case 0x69727943: // Cyrix
-+ element="i386"; // who knows what cyrix supports, lets be safe
-+ break;
-+ default:
-+ break;
-+ } // end switch(ebx)
-+ }
-+
-+#endif
-+ }
- #endif
- #ifdef UNAME_PROCESSOR
- if (element == unknown)
-@@ -265,7 +378,7 @@
-
- if (toprint & PRINT_HARDWARE_PLATFORM)
- {
-- char const *element = unknown;
-+ char *element = unknown;
- #if HAVE_SYSINFO && defined SI_PLATFORM
- {
- static char hardware_platform[257];
-@@ -273,6 +386,15 @@
- hardware_platform, sizeof hardware_platform))
- element = hardware_platform;
- }
-+#else
-+ {
-+ struct utsname u;
-+ uname (&u);
-+ element = u.machine;
-+ if (strlen (element) == 4 && element[0] == 'i' && element[2] == '8'
-+ && element[3] == '6')
-+ element[1] = '3';
-+ }
- #endif
- #ifdef UNAME_HARDWARE_PLATFORM
- if (element == unknown)
-@@ -294,3 +416,29 @@
-
- exit (EXIT_SUCCESS);
- }
-+
-+#ifdef linux
-+
-+/******************************************************************************
-+ *
-+ * int has_sse( void )
-+ * Checks Athlon CPU's to see if they support SSE.
-+ *
-+ *****************************************************************************/
-+
-+int has_sse( void )
-+{
-+ unsigned long edx, unused;
-+ int sse;
-+ cpuid(1,unused,unused,unused,edx);
-+ // I think, I need this tested on a Duron with SSE
-+ // and one without it.
-+ sse = edx & 0x2000000;
-+ if( sse == 0 ) {
-+ return 0;
-+ } else {
-+ return 1;
-+ }
-+
-+}
-+#endif
rmfile ./source/base/coreutils/coreutils-5.2.1-uname-3.patch
}
More information about the Frugalware-darcs
mailing list