diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 22:31:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 19:43:26 +0300 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/rsync | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.xz |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/rsync')
7 files changed, 247 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch b/import-layers/yocto-poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch new file mode 100644 index 000000000..3d27fe72c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch @@ -0,0 +1,69 @@ +Remove the Makefile rules to reinvoke autoconf, they're not out-of-tree safe and +generally overcomplicated, and we ensure that autoreconf is invoked if required. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/Makefile.in b/Makefile.in +index 151247d..8f3fdb6 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -141,58 +141,6 @@ gen: conf proto.h man + gensend: gen + rsync -aivzc $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/ + +-conf: +- cd $(srcdir) && $(MAKE) -f prepare-source.mak conf +- +-aclocal.m4: $(srcdir)/m4/*.m4 +- aclocal -I $(srcdir)/m4 +- +-configure.sh config.h.in: configure.ac aclocal.m4 +- @if test -f configure.sh; then cp -p configure.sh configure.sh.old; else touch configure.sh.old; fi +- @if test -f config.h.in; then cp -p config.h.in config.h.in.old; else touch config.h.in.old; fi +- autoconf -o configure.sh +- autoheader && touch config.h.in +- @if diff configure.sh configure.sh.old >/dev/null 2>&1; then \ +- echo "configure.sh is unchanged."; \ +- rm configure.sh.old; \ +- else \ +- echo "configure.sh has CHANGED."; \ +- fi +- @if diff config.h.in config.h.in.old >/dev/null 2>&1; then \ +- echo "config.h.in is unchanged."; \ +- rm config.h.in.old; \ +- else \ +- echo "config.h.in has CHANGED."; \ +- fi +- @if test -f configure.sh.old -o -f config.h.in.old; then \ +- if test "$(MAKECMDGOALS)" = reconfigure; then \ +- echo 'Continuing with "make reconfigure".'; \ +- else \ +- echo 'You may need to run:'; \ +- echo ' make reconfigure'; \ +- exit 1; \ +- fi \ +- fi +- +-reconfigure: configure.sh +- ./config.status --recheck +- ./config.status +- +-Makefile: Makefile.in config.status configure.sh config.h.in +- @if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi +- @./config.status +- @if diff Makefile Makefile.old >/dev/null 2>&1; then \ +- echo "Makefile is unchanged."; \ +- rm Makefile.old; \ +- else \ +- if test "$(MAKECMDGOALS)" = reconfigure; then \ +- echo 'Continuing with "make reconfigure".'; \ +- else \ +- echo "Makefile updated -- rerun your make command."; \ +- exit 1; \ +- fi \ +- fi +- + rsync-ssl: $(srcdir)/rsync-ssl.in Makefile + sed 's;\@bindir\@;$(bindir);g' <$(srcdir)/rsync-ssl.in >rsync-ssl + @chmod +x rsync-ssl diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/files/rsyncd.conf b/import-layers/yocto-poky/meta/recipes-devtools/rsync/files/rsyncd.conf new file mode 100644 index 000000000..845f5b33f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/files/rsyncd.conf @@ -0,0 +1,15 @@ +# /etc/rsyncd.conf + +# Minimal configuration file for rsync daemon +# See rsync(1) and rsyncd.conf(5) man pages for help + +# This file is required by rsync --daemon +pid file = /var/run/rsyncd.pid +use chroot = yes +read only = yes + +# Simple example for enabling your own local rsync server +#[everything] +# path = / +# comment = Everything except /etc exposed +# exclude = /etc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch new file mode 100644 index 000000000..bea325ea0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch @@ -0,0 +1,71 @@ +Upstream-Status: Backport [ The patch is rsync-2.6.9 specific ] +CVE: CVE-2007-4091 + +The patch is from https://issues.rpath.com/browse/RPL-1647 and is used to +address http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-4091 + +Date: Tue May 10 10:07:36 2011 +0800 +Dexuan Cui <dexuan.cui@intel.com> + +diff --git a/sender.c b/sender.c +index 6fcaa65..053a8f1 100644 +--- a/sender.c ++++ b/sender.c +@@ -123,6 +123,7 @@ void successful_send(int ndx) + char fname[MAXPATHLEN]; + struct file_struct *file; + unsigned int offset; ++ size_t l = 0; + + if (ndx < 0 || ndx >= the_file_list->count) + return; +@@ -133,6 +134,20 @@ void successful_send(int ndx) + file->dir.root, "/", NULL); + } else + offset = 0; ++ ++ l = offset + 1; ++ if (file) { ++ if (file->dirname) ++ l += strlen(file->dirname); ++ if (file->basename) ++ l += strlen(file->basename); ++ } ++ ++ if (l >= sizeof(fname)) { ++ rprintf(FERROR, "Overlong pathname\n"); ++ exit_cleanup(RERR_FILESELECT); ++ } ++ + f_name(file, fname + offset); + if (remove_source_files) { + if (do_unlink(fname) == 0) { +@@ -224,6 +239,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) + enum logcode log_code = log_before_transfer ? FLOG : FINFO; + int f_xfer = write_batch < 0 ? batch_fd : f_out; + int i, j; ++ size_t l = 0; + + if (verbose > 2) + rprintf(FINFO, "send_files starting\n"); +@@ -259,6 +275,20 @@ void send_files(struct file_list *flist, int f_out, int f_in) + fname[offset++] = '/'; + } else + offset = 0; ++ ++ l = offset + 1; ++ if (file) { ++ if (file->dirname) ++ l += strlen(file->dirname); ++ if (file->basename) ++ l += strlen(file->basename); ++ } ++ ++ if (l >= sizeof(fname)) { ++ rprintf(FERROR, "Overlong pathname\n"); ++ exit_cleanup(RERR_FILESELECT); ++ } ++ + fname2 = f_name(file, fname + offset); + + if (verbose > 2) diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf new file mode 100644 index 000000000..845f5b33f --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsyncd.conf @@ -0,0 +1,15 @@ +# /etc/rsyncd.conf + +# Minimal configuration file for rsync daemon +# See rsync(1) and rsyncd.conf(5) man pages for help + +# This file is required by rsync --daemon +pid file = /var/run/rsyncd.pid +use chroot = yes +read only = yes + +# Simple example for enabling your own local rsync server +#[everything] +# path = / +# comment = Everything except /etc exposed +# exclude = /etc diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc new file mode 100644 index 000000000..c65f27031 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc @@ -0,0 +1,23 @@ +SUMMARY = "File synchronization tool" +HOMEPAGE = "http://rsync.samba.org/" +BUGTRACKER = "http://rsync.samba.org/bugzilla.html" +SECTION = "console/network" + +# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +# needs to add acl and attr +DEPENDS = "popt" + +SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \ + file://rsyncd.conf" + +inherit autotools + +do_install_append() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/rsyncd.conf ${D}${sysconfdir} +} + +EXTRA_OEMAKE='STRIP=""' diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb new file mode 100644 index 000000000..6854c77f7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb @@ -0,0 +1,28 @@ +SUMMARY = "File synchronization tool" +HOMEPAGE = "http://rsync.samba.org/" +BUGTRACKER = "http://rsync.samba.org/bugzilla.html" +SECTION = "console/network" + +# needs to add acl and attr +DEPENDS = "popt" + +SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \ + file://rsync-2.6.9-fname-obo.patch \ + file://rsyncd.conf" + +SRC_URI[md5sum] = "996d8d8831dbca17910094e56dcb5942" +SRC_URI[sha256sum] = "ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9" + +inherit autotools + +do_install_append() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/rsyncd.conf ${D}${sysconfdir} +} + +EXTRA_OEMAKE='STRIP=""' + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c" + +PR = "r4" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb new file mode 100644 index 000000000..9637ed4e7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb @@ -0,0 +1,26 @@ +require rsync.inc + +SRC_URI += "file://makefile-no-rebuild.patch" + +SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb" +SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2" + +PACKAGECONFIG ??= "acl attr" +PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl," +PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr," + +# By default, if crosscompiling, rsync disables a number of +# capabilities, hardlinking symlinks and special files (i.e. devices) +CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes" + +# rsync 3.0 uses configure.sh instead of configure, and +# makefile checks the existence of configure.sh +do_configure_prepend () { + rm -f ${S}/configure ${S}/configure.sh +} + +do_configure_append () { + cp -f ${S}/configure ${S}/configure.sh +} + +BBCLASSEXTEND = "native" |