diff options
Diffstat (limited to 'app-arch/tarsync')
-rw-r--r-- | app-arch/tarsync/Manifest | 2 | ||||
-rw-r--r-- | app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch | 59 | ||||
-rw-r--r-- | app-arch/tarsync/files/tarsync-0.2.1-make.patch | 13 | ||||
-rw-r--r-- | app-arch/tarsync/files/tarsync-0.2.1-symlink.patch | 139 | ||||
-rw-r--r-- | app-arch/tarsync/tarsync-0.2.1-r1.ebuild | 33 | ||||
-rw-r--r-- | app-arch/tarsync/tarsync-0.2.1-r2.ebuild | 34 | ||||
-rw-r--r-- | app-arch/tarsync/tarsync-0.2.2.ebuild | 26 | ||||
-rw-r--r-- | app-arch/tarsync/tarsync-0.2.3.ebuild | 4 |
8 files changed, 2 insertions, 308 deletions
diff --git a/app-arch/tarsync/Manifest b/app-arch/tarsync/Manifest index d25b4efc14bb..407f6af99559 100644 --- a/app-arch/tarsync/Manifest +++ b/app-arch/tarsync/Manifest @@ -1,3 +1 @@ -DIST tarsync-0.2.1.tar.bz2 13593 BLAKE2B 4841d501587c8d4932031fe939fce9f41019622af2a4253bfe12c01160956e7eaeebf5ff00174332dce6b17ae150ead42b7c1a57483f948ba191b5c3943f6596 SHA512 bebf8e495ad196c002414c41f9fe9737b5300de18b7c3b16576a7d3bfd94608f36f1b86cb6ed4879c600b71c7706255d9b2d4140b73c5743a473fa2500dbca2d -DIST tarsync-0.2.2.tar.gz 21028 BLAKE2B 33aae739c990a85d8ce9458545b829743a3babd30890988f83d9ad6eebe96ffb48f872b5afb947fe58eb9156000513d65e299cdcc57ffc7e9cb12ee4d986b784 SHA512 88d7ca773538f7d2d612068ce9b6b4389d63e627a12f6377a7e7f397700d92eb29c6f4facc6b698454710e63808a3b4d6acc7901c6999dcca2de93c5d58a2622 DIST tarsync-0.2.3.tar.gz 21148 BLAKE2B 53eff0b6b8b3a6fe9c9e56a08659c02ec01b9e521dd06abd3fe9c04da6ec463eb79758ffe5bce17dc0396c3c5d6daf258d8dc5c2479047f9a1e14f892e05948b SHA512 dcb4c4e329b2a25ce0e9986defb0dfb76417352683c9ff5c71ed32861be3847d47af7db4e28b214e194cb1751b8934bb11644450a3dccd0bf24fcf009167a03b diff --git a/app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch b/app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch deleted file mode 100644 index f11c86bb248a..000000000000 --- a/app-arch/tarsync/files/tarsync-0.2.1-gcc5.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/excludes.c b/excludes.c -index b7c928d..fa43cef 100644 ---- a/excludes.c -+++ b/excludes.c -@@ -106,7 +106,7 @@ build_exclude(fnm_exclude **ex_ptr, const char *pattern) - } - - --inline int -+int - match_excludes(const char *dir, const char *file, fnm_exclude **excludes) - { - char *p; -diff --git a/main.c b/main.c -index 84feed4..2c2da3e 100644 ---- a/main.c -+++ b/main.c -@@ -42,8 +42,8 @@ int remove_node(const char *path, struct stat *st); - int ensure_files_layout(const tar_entry **ttar, const unsigned int ttar_count, tar_entry ***missing, - unsigned int *missing_count, tar_entry ***existing, unsigned int *existing_count, - fnm_exclude **excludes); --inline int check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st); --inline int enforce_owner(const char *path, const tar_entry *t, struct stat *st); -+int check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st); -+int enforce_owner(const char *path, const tar_entry *t, struct stat *st); - int copy_whole_file(cfile *tar_cfh, const tar_entry *ttent); - - static int check_mtime = 1; -@@ -669,7 +669,7 @@ recursively_delete_dir(const char *path) - return ret; - } - --inline int -+int - check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st) - { - int type; -@@ -685,7 +685,7 @@ check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st - return 0; - } - --inline int -+int - enforce_owner(const char *path, const tar_entry *t, struct stat *st) - { - struct stat st2; -diff --git a/tar.c b/tar.c -index 792ccd4..42dc8e7 100644 ---- a/tar.c -+++ b/tar.c -@@ -40,7 +40,7 @@ int check_str_chksum(const char *block) - - /* possibly this could be done different, what of endptr of strtol? - Frankly I worry about strtol trying to go too far and causing a segfault, due to tar fields not always having trailing \0 */ --inline unsigned long octal_str2long(const char *string, unsigned int length) -+unsigned long octal_str2long(const char *string, unsigned int length) - { - if(string[length]) { - char *ptr = strndup(string, length); diff --git a/app-arch/tarsync/files/tarsync-0.2.1-make.patch b/app-arch/tarsync/files/tarsync-0.2.1-make.patch deleted file mode 100644 index 4f3d062f3619..000000000000 --- a/app-arch/tarsync/files/tarsync-0.2.1-make.patch +++ /dev/null @@ -1,13 +0,0 @@ -Respect CC, CPPFLAGS and LDFLAGS. - ---- a/Makefile -+++ b/Makefile -@@ -2,7 +2,7 @@ - CC=gcc - endif - tarsync: main.o names.o tar.o string-misc.o fs.o options.o excludes.o -- gcc $(CFLAGS) $^ -o tarsync -lcfile -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ -o tarsync -lcfile - all: tarsync - - clean: diff --git a/app-arch/tarsync/files/tarsync-0.2.1-symlink.patch b/app-arch/tarsync/files/tarsync-0.2.1-symlink.patch deleted file mode 100644 index cb0efd01b1ba..000000000000 --- a/app-arch/tarsync/files/tarsync-0.2.1-symlink.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 6654d41a14da2fc521e889f01669f0dbb89aef15 Mon Sep 17 00:00:00 2001 -From: Zac Medico <zmedico@gentoo.org> -Date: Tue, 5 Oct 2021 23:21:53 -0700 -Subject: [PATCH] Symlink support - -Bug: https://bugs.gentoo.org/815823 -Signed-off-by: Zac Medico <zmedico@gentoo.org> ---- - main.c | 37 +++++++++++++++++++++++++++++++++++-- - tar.c | 16 ++++++++++++++-- - tar.h | 2 ++ - 3 files changed, 51 insertions(+), 4 deletions(-) - -diff --git a/main.c b/main.c -index 2c2da3e..448a9d0 100644 ---- a/main.c -+++ b/main.c -@@ -257,7 +257,14 @@ main(int argc, char **argv) - // no need to seek. cfile handles resetting streams as needed - - for(x=0; x < missing_count; x++) { -- if(copy_whole_file(&tar_cfh, missing[x]) != 0) { -+ if (missing[x]->type == SYMTYPE) { -+ if(copy_symlink(&tar_cfh, missing[x]) != 0) { -+ v0printf("failed transfering symlink %s\n", missing[x]->fullname); -+ exit(9); -+ } -+ continue; -+ } -+ else if(copy_whole_file(&tar_cfh, missing[x]) != 0) { - v0printf("failed transfering file %s\n", missing[x]->fullname); - exit(9); - } -@@ -673,6 +680,8 @@ int - check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st) - { - int type; -+ unsigned char linkname[TAR_LINKNAME_LEN]; -+ ssize_t linkname_len; - type = convert_lstat_type_tar_type(de->d_name, st); - if(type < 0) - return -1; -@@ -682,6 +691,15 @@ check_existing_node(const struct dirent *de, const tar_entry *t, struct stat *st - return 2; - if(REGTYPE == type && (st->st_size != t->size || (check_mtime && t->mtime != st->st_mtime))) - return 3; -+ if (SYMTYPE == type) { -+ if ((linkname_len = readlink(de->d_name, linkname, TAR_LINKNAME_LEN)) == -1) { -+ return -1; -+ } -+ if(strncmp((const char *)linkname, (const char *)t->linkname, linkname_len) != 0) { -+ remove_node(de->d_name, st); -+ return 3; -+ } -+ } - return 0; - } - -@@ -703,7 +721,22 @@ enforce_owner(const char *path, const tar_entry *t, struct stat *st) - } - return 0; - } -- -+ -+int -+copy_symlink(cfile *tar_cfh, const tar_entry *ttent) -+{ -+ v1printf("creating %s\n", ttent->fullname); -+ -+ if (symlink(ttent->linkname, ttent->fullname) != 0) { -+ v0printf("failed creating symlink %s -> %s\n", ttent->fullname, ttent->linkname); -+ return -1; -+ } -+ if(lchown(ttent->fullname, ttent->uid, ttent->gid) != 0) { -+ v0printf("failed chown'ing %s\n", ttent->fullname); -+ return -1; -+ } -+ return 0; -+} - - int - copy_whole_file(cfile *tar_cfh, const tar_entry *ttent) -diff --git a/tar.c b/tar.c -index 42dc8e7..514e5fb 100644 ---- a/tar.c -+++ b/tar.c -@@ -214,8 +214,7 @@ read_entry(cfile *src_cfh, off_u64 start, tar_entry *entry) - case AREGTYPE: - entry->type = REGTYPE; break; - case SYMTYPE: -- v0printf("symlinks not supported\n"); -- entry->type = TTAR_UNSUPPORTED_TYPE; break; -+ entry->type = SYMTYPE; break; - case LNKTYPE: - v0printf("hardlinks not supported!\n"); - entry->type = TTAR_UNSUPPORTED_TYPE; break; -@@ -242,6 +241,17 @@ read_entry(cfile *src_cfh, off_u64 start, tar_entry *entry) - if(get_uid(block + TAR_UNAME_LOC, &entry->uid)) - entry->uid = octal_str2long(block + TAR_UID_LOC, TAR_UID_LOC); - -+ if (entry->type == SYMTYPE) { -+ name_len = strnlen((char *)block + TAR_LINKNAME_LOC, TAR_LINKNAME_LEN); -+ if((entry->linkname = (char *)malloc(name_len + 1)) == NULL){ -+ v0printf("unable to allocate needed memory, bailing\n"); -+ return MEM_ERROR; -+ } -+ memcpy(entry->linkname, block + TAR_LINKNAME_LOC, name_len); -+ entry->linkname[name_len] = '\0'; -+ entry->linkname_len = name_len; -+ } -+ - // if(entry->end % 512) - // entry->end += 512 - (entry->end % 512); - return 0; -@@ -256,6 +266,8 @@ convert_lstat_type_tar_type(const char *path, struct stat *st) - if(S_ISREG(st->st_mode)) { - if(st->st_nlink == 1) - return REGTYPE; -+ } else if(S_ISLNK(st->st_mode)) { -+ return SYMTYPE; - } else if(S_ISDIR(st->st_mode)) - return DIRTYPE; - -diff --git a/tar.h b/tar.h -index e9d9ee9..95f957c 100644 ---- a/tar.h -+++ b/tar.h -@@ -78,6 +78,8 @@ typedef struct { - off_u64 size; - unsigned int fullname_len; - char *fullname; -+ unsigned int linkname_len; -+ char *linkname; - time_t mtime; - uid_t uid; - gid_t gid; --- -2.32.0 - diff --git a/app-arch/tarsync/tarsync-0.2.1-r1.ebuild b/app-arch/tarsync/tarsync-0.2.1-r1.ebuild deleted file mode 100644 index f2048606800d..000000000000 --- a/app-arch/tarsync/tarsync-0.2.1-r1.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Delta compression suite for using/generating binary patches" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" -SRC_URI="mirror://gentoo/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~hppa ppc x86 ~amd64-linux" - -DEPEND=">=dev-util/diffball-0.7" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${PN}" - -PATCHES=( - "${FILESDIR}"/${P}-make.patch - "${FILESDIR}"/${P}-gcc5.patch -) - -src_configure() { - tc-export CC -} - -src_install() { - dobin tarsync #make install doesn't support prefix - einstalldocs -} diff --git a/app-arch/tarsync/tarsync-0.2.1-r2.ebuild b/app-arch/tarsync/tarsync-0.2.1-r2.ebuild deleted file mode 100644 index 03f32dcfee79..000000000000 --- a/app-arch/tarsync/tarsync-0.2.1-r2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Delta compression suite for using/generating binary patches" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" -SRC_URI="mirror://gentoo/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~hppa ppc x86 ~amd64-linux" - -DEPEND=">=dev-util/diffball-0.7" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${PN}" - -PATCHES=( - "${FILESDIR}"/${P}-make.patch - "${FILESDIR}"/${P}-gcc5.patch - "${FILESDIR}"/${P}-symlink.patch -) - -src_configure() { - tc-export CC -} - -src_install() { - dobin tarsync #make install doesn't support prefix - einstalldocs -} diff --git a/app-arch/tarsync/tarsync-0.2.2.ebuild b/app-arch/tarsync/tarsync-0.2.2.ebuild deleted file mode 100644 index 869ab23ff2c4..000000000000 --- a/app-arch/tarsync/tarsync-0.2.2.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Delta compression suite for using/generating binary patches" -HOMEPAGE="https://github.com/zmedico/tarsync" -SRC_URI="https://github.com/zmedico/tarsync/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux" - -DEPEND=">=dev-util/diffball-0.7" -RDEPEND="${DEPEND}" - -src_configure() { - tc-export CC -} - -src_install() { - dobin tarsync #make install doesn't support prefix - einstalldocs -} diff --git a/app-arch/tarsync/tarsync-0.2.3.ebuild b/app-arch/tarsync/tarsync-0.2.3.ebuild index 2fe75085a6d7..50c6d73f3dbf 100644 --- a/app-arch/tarsync/tarsync-0.2.3.ebuild +++ b/app-arch/tarsync/tarsync-0.2.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/zmedico/tarsync/archive/refs/tags/v${PV}.tar.gz -> $ LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux" +KEYWORDS="amd64 ~hppa ppc x86 ~amd64-linux" DEPEND=">=dev-util/diffball-0.7:=" RDEPEND="${DEPEND}" |