Skip to content

Commit

Permalink
*/*: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Sep 18, 2015
1 parent d3b7f6d commit d10dc7f
Show file tree
Hide file tree
Showing 307 changed files with 2,206 additions and 2,361 deletions.
3 changes: 1 addition & 2 deletions archivers/gcpio/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $FreeBSD$

PORTNAME= cpio
PORTVERSION= 2.11
PORTREVISION= 3
PORTVERSION= 2.12
CATEGORIES= archivers
MASTER_SITES= GNU
PKGNAMEPREFIX= g
Expand Down
4 changes: 2 additions & 2 deletions archivers/gcpio/distinfo
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SHA256 (cpio-2.11.tar.bz2) = bb820bfd96e74fc6ce43104f06fe733178517e7f5d1cdee553773e8eff7d5bbd
SIZE (cpio-2.11.tar.bz2) = 1018483
SHA256 (cpio-2.12.tar.bz2) = 70998c5816ace8407c8b101c9ba1ffd3ebbecba1f5031046893307580ec1296e
SIZE (cpio-2.12.tar.bz2) = 1258605
11 changes: 0 additions & 11 deletions archivers/gcpio/files/patch-doc_Makefile.in

This file was deleted.

52 changes: 31 additions & 21 deletions archivers/gcpio/files/patch-doc_cpio.1
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
--- doc/cpio.1.orig 2009-02-14 18:15:50 UTC
--- doc/cpio.1.orig 2015-09-12 10:57:30 UTC
+++ doc/cpio.1
@@ -1,8 +1,8 @@
.TH CPIO 1L \" -*- nroff -*-
@@ -15,9 +15,9 @@
.\" along with GNU cpio. If not, see <http://www.gnu.org/licenses/>.
.TH CPIO 1 "December 1, 2014" "CPIO" "GNU CPIO"
.SH NAME
-cpio \- copy files to and from archives
+gcpio \- copy files to and from archives
.SH SYNOPSIS
-.B cpio
+.B gcpio
{\-o|\-\-create} [\-0acvABLV] [\-C bytes] [\-H format] [\-M message]
[\-O [[user@]host:]archive] [\-F [[user@]host:]archive]
[\-\-file=[[user@]host:]archive] [\-\-format=format] [\-\-message=message]
@@ -11,7 +11,7 @@ cpio \- copy files to and from archives
[\-\-force\-local] [\-\-rsh-command=command] [\-\-help] [\-\-version]
< name-list [> archive]
{\fB\-o\fR|\fB\-\-create\fR} [\fB\-0acvABLV\fR] [\fB\-C\fR \fIBYTES\fR]
[\fB\-H\fR \fIFORMAT\fR] [\fB\-M\fR \fIMESSAGE\fR]
[\fB\-O\fR [[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR]
@@ -31,7 +31,7 @@ cpio \- copy files to and from archives
[\fB\-\-force\-local\fR] [\fB\-\-rsh\-command=\fICOMMAND\fR]
\fB<\fR \fIname-list\fR [\fB>\fR \fIarchive\fR]

-.B cpio
+.B gcpio
{\-i|\-\-extract} [\-bcdfmnrtsuvBSV] [\-C bytes] [\-E file] [\-H format]
[\-M message] [\-R [user][:.][group]] [\-I [[user@]host:]archive]
[\-F [[user@]host:]archive] [\-\-file=[[user@]host:]archive]
@@ -22,9 +22,10 @@ cpio \- copy files to and from archives
[\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
[\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse]
[\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command]
+[\-\-extract\-over\-symlinks]
[\-\-help] [\-\-version] [pattern...] [< archive]
{\fB\-i\fR|\fB\-\-extract\fR} [\fB\-bcdfmnrtsuvBSV\fR] [\fB\-C\fR \fIBYTES\fR]
[\fB\-E\fR \fIFILE\fR] [\fB\-H\fR \fIFORMAT\fR]
[\fB\-M\fR \fIMESSAGE\fR] [\fB\-R\fR [\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]]
@@ -50,9 +50,10 @@ cpio \- copy files to and from archives
[\fB\-\-force\-local\fR] [\fB\-\-no\-absolute\-filenames\fR] [\fB\-\-sparse\fR]
[\fB\-\-only\-verify\-crc\fR] [\fB\-\-to\-stdout\fR] [\fB\-\-quiet\fR]
[\fB\-\-rsh\-command=\fICOMMAND\fR]
+[\fB\-\-extract\-over\-symlinks\fR]
[\fIpattern\fR...] [\fB<\fR \fIarchive\fR]

-.B cpio
+.B gcpio
{\-p|\-\-pass-through} [\-0adlmuvLV] [\-R [user][:.][group]]
[\-\-null] [\-\-reset-access-time] [\-\-make-directories] [\-\-link] [\-\-quiet]
[\-\-preserve-modification-time] [\-\-unconditional] [\-\-verbose] [\-\-dot]
{\fB\-p\fR|\fB\-\-pass\-through\fR} [\fB\-0adlmuvLV\fR]
[\fB\-R\fR [\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]]
[\fB\-\-null\fR] [\fB\-\-reset\-access\-time\fR]
@@ -63,7 +64,7 @@ cpio \- copy files to and from archives
[\fB\-\-no\-preserve\-owner\fR] [\fB\-\-sparse\fR]
\fIdestination-directory\fR \fB<\fR \fIname-list\fR

-.B cpio
+.B gcpio
{\fB\-?\fR|\fB\-\-help\fR|\fB\-\-usage\fR|\fB\-\-version\fR}
.SH NOTE
This manpage is a short description of GNU \fBcpio\fR. For a detailed
4 changes: 2 additions & 2 deletions archivers/gcpio/files/patch-gnu_Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- gnu/Makefile.in.orig 2010-03-10 13:00:36 UTC
--- gnu/Makefile.in.orig 2015-09-12 11:11:14 UTC
+++ gnu/Makefile.in
@@ -1720,7 +1720,7 @@ inttypes.h: inttypes.in.h $(WARN_ON_USE_
@@ -2077,7 +2077,7 @@ inttypes.h: inttypes.in.h $(top_builddir
# avoid installing it.

all-local: charset.alias ref-add.sed ref-del.sed
Expand Down
114 changes: 4 additions & 110 deletions archivers/gcpio/files/patch-src_copyin.c
Original file line number Diff line number Diff line change
@@ -1,92 +1,6 @@
--- src/copyin.c.orig 2010-02-15 10:02:23 UTC
--- src/copyin.c.orig 2015-09-12 10:57:30 UTC
+++ src/copyin.c
@@ -124,10 +124,30 @@ tape_skip_padding (int in_file_des, off_
if (pad != 0)
tape_toss_input (in_file_des, pad);
}
-
+
+static char *
+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
+{
+ char *link_name;
+
+ if (file_hdr->c_filesize < 0 || file_hdr->c_filesize > SIZE_MAX-1)
+ {
+ error (0, 0, _("%s: stored filename length is out of range"),
+ file_hdr->c_name);
+ link_name = NULL;
+ }
+ else
+ {
+ link_name = xmalloc (file_hdr->c_filesize + 1);
+ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+ link_name[file_hdr->c_filesize] = '\0';
+ tape_skip_padding (in_file_des, file_hdr->c_filesize);
+ }
+ return link_name;
+}

static void
-list_file(struct cpio_file_stat* file_hdr, int in_file_des)
+list_file (struct cpio_file_stat* file_hdr, int in_file_des)
{
if (verbose_flag)
{
@@ -136,21 +156,16 @@ list_file(struct cpio_file_stat* file_hd
{
if (archive_format != arf_tar && archive_format != arf_ustar)
{
- char *link_name = NULL; /* Name of hard and symbolic links. */
-
- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
- link_name[file_hdr->c_filesize] = '\0';
- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
- long_format (file_hdr, link_name);
- free (link_name);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- return;
+ char *link_name = get_link_name (file_hdr, in_file_des);
+ if (link_name)
+ {
+ long_format (file_hdr, link_name);
+ free (link_name);
+ }
}
else
- {
- long_format (file_hdr, file_hdr->c_tar_linkname);
- return;
- }
+ long_format (file_hdr, file_hdr->c_tar_linkname);
+ return;
}
else
#endif
@@ -640,7 +655,7 @@ copyin_device (struct cpio_file_stat* fi
}

static void
-copyin_link(struct cpio_file_stat *file_hdr, int in_file_des)
+copyin_link (struct cpio_file_stat *file_hdr, int in_file_des)
{
char *link_name = NULL; /* Name of hard and symbolic links. */
int res; /* Result of various function calls. */
@@ -650,10 +665,9 @@ copyin_link(struct cpio_file_stat *file_

if (archive_format != arf_tar && archive_format != arf_ustar)
{
- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
- link_name[file_hdr->c_filesize] = '\0';
- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
+ link_name = get_link_name (file_hdr, in_file_des);
+ if (!link_name)
+ return;
}
else
{
@@ -686,6 +700,51 @@ copyin_link(struct cpio_file_stat *file_
@@ -695,6 +695,51 @@ copyin_link (struct cpio_file_stat *file
free (link_name);
}

Expand Down Expand Up @@ -138,27 +52,7 @@
static void
copyin_file (struct cpio_file_stat *file_hdr, int in_file_des)
{
@@ -1005,7 +1064,7 @@ read_in_header (struct cpio_file_stat *f

file_hdr->c_tar_linkname = NULL;

- tape_buffered_read (magic.str, in_des, 6L);
+ tape_buffered_read (magic.str, in_des, sizeof (magic.str));
while (1)
{
if (append_flag)
@@ -1050,8 +1109,8 @@ read_in_header (struct cpio_file_stat *f
break;
}
bytes_skipped++;
- memmove (magic.str, magic.str + 1, 5);
- tape_buffered_read (magic.str, in_des, 1L);
+ memmove (magic.str, magic.str + 1, sizeof (magic.str) - 1);
+ tape_buffered_read (magic.str + sizeof (magic.str) - 1, in_des, 1L);
}
}

@@ -1457,6 +1516,23 @@ process_copy_in ()
@@ -1468,6 +1513,23 @@ process_copy_in ()
{
/* Copy the input file into the directory structure. */

Expand All @@ -175,7 +69,7 @@
+ continue;
+ */
+ /* terminate */
+ error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name);
+ error (PAXEXIT_FAILURE, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name);
+ }
+ }
+
Expand Down
6 changes: 3 additions & 3 deletions archivers/gcpio/files/patch-src_extern.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--- src/extern.h.orig 2010-02-15 10:02:23 UTC
--- src/extern.h.orig 2015-09-12 10:57:30 UTC
+++ src/extern.h
@@ -95,6 +95,7 @@ extern char input_is_special;
@@ -96,6 +96,7 @@ extern char input_is_special;
extern char output_is_special;
extern char input_is_seekable;
extern char output_is_seekable;
+extern bool extract_over_symlinks;
extern int (*xstat) ();
extern void (*copy_function) ();

extern char *change_directory_option;
12 changes: 0 additions & 12 deletions archivers/gcpio/files/patch-src_filetypes.h

This file was deleted.

2 changes: 1 addition & 1 deletion archivers/gcpio/files/patch-src_global.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- src/global.c.orig 2010-02-12 10:19:23 UTC
--- src/global.c.orig 2015-09-12 10:57:30 UTC
+++ src/global.c
@@ -187,6 +187,9 @@ bool to_stdout_option = false;
/* The name this program was run with. */
Expand Down
20 changes: 10 additions & 10 deletions archivers/gcpio/files/patch-src_main.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
--- src/main.c.orig 2010-02-12 11:35:09 UTC
--- src/main.c.orig 2015-09-12 10:57:30 UTC
+++ src/main.c
@@ -57,7 +57,8 @@ enum cpio_options {
FORCE_LOCAL_OPTION,
DEBUG_OPTION,
BLOCK_SIZE_OPTION,
- TO_STDOUT_OPTION
+ TO_STDOUT_OPTION,
@@ -61,7 +61,8 @@ enum cpio_options {
TO_STDOUT_OPTION,
RENUMBER_INODES_OPTION,
IGNORE_DEVNO_OPTION,
- DEVICE_INDEPENDENT_OPTION
+ DEVICE_INDEPENDENT_OPTION,
+ EXTRACT_OVER_SYMLINKS
};

const char *program_authors[] =
@@ -222,6 +223,8 @@ static struct argp_option options[] = {
@@ -243,6 +244,8 @@ static struct argp_option options[] = {
N_("Create leading directories where needed"), GRID+1 },
{"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0,
N_("Do not change the ownership of the files"), GRID+1 },
Expand All @@ -19,7 +19,7 @@
{"unconditional", 'u', NULL, 0,
N_("Replace all files unconditionally"), GRID+1 },
{"sparse", SPARSE_OPTION, NULL, 0,
@@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als
@@ -432,6 +435,10 @@ crc newc odc bin ustar tar (all-caps als
no_chown_flag = true;
break;

Expand All @@ -29,4 +29,4 @@
+
case 'o': /* Copy-out mode. */
if (copy_function != 0)
error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
USAGE_ERROR ((0, 0, _("Mode already defined")));
14 changes: 0 additions & 14 deletions archivers/gcpio/files/patch-src_util.c

This file was deleted.

15 changes: 15 additions & 0 deletions archivers/gcpio/files/patch-tests_symlink-long.at
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- tests/symlink-long.at.orig 2015-09-12 10:57:30 UTC
+++ tests/symlink-long.at
@@ -27,9 +27,11 @@ AT_CHECK([

# len(dirname) > READBUFSIZE
dirname=
-for i in {1..52}; do
+i=1
+while test $i -le 52; do
dirname="xxxxxxxxx/$dirname"
mkdir "$dirname"
+ i=`expr $i + 1`
done
ln -s "$dirname" x || AT_SKIP_TEST

4 changes: 4 additions & 0 deletions archivers/gcpio/pkg-plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ man/man1/gcpio.1.gz
%%NLS%%share/locale/fr/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/ga/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/gl/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/hr/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/hu/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/id/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/it/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/ja/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/ko/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/nl/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/pl/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/ro/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/ru/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/sr/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/sv/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/tr/LC_MESSAGES/cpio.mo
%%NLS%%share/locale/uk/LC_MESSAGES/cpio.mo
Expand Down
1 change: 1 addition & 0 deletions astro/p5-Astro-Coords/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
TEST_DEPENDS= p5-Test-Number-Delta>=0:${PORTSDIR}/devel/p5-Test-Number-Delta \
p5-Test-Pod>=1:${PORTSDIR}/devel/p5-Test-Pod

NO_ARCH= yes
USE_PERL5= modbuild
USES= perl5

Expand Down
4 changes: 4 additions & 0 deletions astro/p5-Astro-Flux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ PKGNAMEPREFIX= p5-
MAINTAINER= [email protected]
COMMENT= Class for handling astronomical flux quantities

LICENSE= ART10 GPLv1
LICENSE_COMB= dual

BUILD_DEPENDS= p5-Astro-WaveBand>=0:${PORTSDIR}/astro/p5-Astro-WaveBand \
p5-DateTime>=0:${PORTSDIR}/devel/p5-DateTime \
p5-Misc-Quality>=0:${PORTSDIR}/astro/p5-Misc-Quality \
p5-Number-Uncertainty>=0:${PORTSDIR}/math/p5-Number-Uncertainty
RUN_DEPENDS:= ${BUILD_DEPENDS}

NO_ARCH= yes
USE_PERL5= configure
USES= perl5

Expand Down
1 change: 1 addition & 0 deletions astro/p5-Astro-Telescope/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ LICENSE_COMB= dual
BUILD_DEPENDS= p5-Astro-PAL>=0.99:${PORTSDIR}/astro/p5-Astro-PAL
RUN_DEPENDS:= ${BUILD_DEPENDS}

NO_ARCH= yes
USE_PERL5= modbuild
USES= perl5

Expand Down
1 change: 1 addition & 0 deletions astro/p5-Astro-WaveBand/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ COMMENT= Transparently work in waveband, wavelength, or filter
LICENSE= ART10 GPLv1
LICENSE_COMB= dual

NO_ARCH= yes
USE_PERL5= modbuild
USES= perl5

Expand Down
Loading

0 comments on commit d10dc7f

Please sign in to comment.