<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3247</bug_id>
          
          <creation_ts>2012-10-06 15:40:34 +0000</creation_ts>
          <short_desc>Can&apos;t check out poky repo on Windows</short_desc>
          <delta_ts>2012-10-06 19:24:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Evadeflow">evadeflow</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26306</commentid>
    <comment_count>0</comment_count>
    <who name="Evadeflow">evadeflow</who>
    <bug_when>2012-10-06 15:40:34 +0000</bug_when>
    <thetext>I wanted to set up an HTTP-accessible mirror of poky and a few meta-xxx
layers so I can sync with them from behind my company&apos;s firewall.  I was
planning to use a PC at home to pull the latest upstream &apos;git:://&apos;
sources every 15 minutes and then push them to a (HTTP-accessible)
mirror on github.

I wanted to use a Windows box for this, because I happen to have one
sitting around at home doing nothing most of the time.  Alas, this isn&apos;t
possible due to some fiendishly clever (ab)use of file-naming
conventions. When I try to clone poky onto an NTFS filesystem using
msysgit, I get the errors shown appended below.

I&apos;m pretty sure this is expected behavior, but I found it intriguing
enough that I thought it worthwhile to document in a place where google
can find it. Also, I found a workaround that allows me to use a Windows
box for mirror-wrangling, anyway. Basically, I did the following:

&gt; $ git clone --mirror git://git.yoctoproject.org/poky.git
&gt; $ cd poky.git
&gt; $ git remote add github git@github.com:evadeflow/poky.git
&gt; $ git push --mirror github

The &apos;clone --mirror&apos; command creates a bare repo with no working copy,
so I avoid the errors due to invalid filenames.  Then, I just run a
script every 15 minutes that changes to poky.git folder and does:

&gt; $ git fetch
&gt; $ git push --mirror github

So far, it seems to work fine. I think this is the &apos;right&apos; way to handle
mirroring, even from Linux. (When all you want to do is fetch/push
without injecting any customizations, a working copy isn&apos;t actually
needed...)

--------------------
[Errors seen with a naive attempt to clone poky on Windows]

&gt; $ git clone git://git.yoctoproject.org/poky.git
&gt; Cloning into &apos;poky&apos;...
&gt; remote: Counting objects: 162905, done.
&gt; remote: Compressing objects: 100% (42924/42924), done.
&gt; remote: Total 162905 (delta 116084), reused 162788 (delta 115967)
&gt; Receiving objects: 100% (162905/162905), 81.67 MiB | 350 KiB/s, done.
&gt; Resolving deltas: 100% (116084/116084), done.
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver == &quot;y&quot;: }} xorg.conf (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/{{ if xserver == &quot;y&quot;: }} xserver-xf86-config_0.1.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.2&quot;: }} linux-yocto-rt_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.4&quot;: }} linux-yocto-rt_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.2&quot;: }} linux-yocto_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.4&quot;: }} linux-yocto_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver_choice == &quot;xserver_emgd&quot;: }} xorg.conf (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver_choice == &quot;xserver_i915&quot;: }} xorg.conf (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver_choice == &quot;xserver_vesa&quot;: }} xorg.conf (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/{{ if xserver == &quot;y&quot;: }} xserver-xf86-config_0.1.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.2&quot;: }} linux-yocto-rt_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.4&quot;: }} linux-yocto-rt_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.2&quot;: }} linux-yocto_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.4&quot;: }} linux-yocto_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.2&quot;: }} linux-yocto-rt_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.4&quot;: }} linux-yocto-rt_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.2&quot;: }} linux-yocto_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.4&quot;: }} linux-yocto_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.2&quot;: }} linux-yocto-rt_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.4&quot;: }} linux-yocto-rt_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.2&quot;: }} linux-yocto_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.4&quot;: }} linux-yocto_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.2&quot;: }} linux-yocto-rt_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.4&quot;: }} linux-yocto-rt_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.2&quot;: }} linux-yocto_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.4&quot;: }} linux-yocto_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver_choice ==&quot;xserver_i915&quot;: }} xorg.conf (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/{{=machine}}/{{ if xserver_choice ==&quot;xserver_vesa&quot;: }} xorg.conf (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/{{ if xserver == &quot;y&quot;: }} xserver-xf86-config_0.1.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.2&quot;: }} linux-yocto-rt_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto-rt_3.4&quot;: }} linux-yocto-rt_3.4.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.2&quot;: }} linux-yocto_3.2.bbappend (Invalid argument)
&gt; error: unable to create file scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/{{ if kernel_choice == &quot;linux-yocto_3.4&quot;: }} linux-yocto_3.4.bbappend (Invalid argument)
&gt; Checking out files: 100% (3845/3845), done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26307</commentid>
    <comment_count>1</comment_count>
    <who name="Evadeflow">evadeflow</who>
    <bug_when>2012-10-06 15:43:12 +0000</bug_when>
    <thetext>I&apos;m closing this since I really only created it as a &apos;Note To Self&apos;. Please let me know if doing this messes with bug tracking metrics or something and I&apos;ll desist...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26308</commentid>
    <comment_count>2</comment_count>
    <who name="Evadeflow">evadeflow</who>
    <bug_when>2012-10-06 19:24:03 +0000</bug_when>
    <thetext>I set up mirrors of poky and the layers I&apos;m interested in at:

  - http://github.com/yoctoproject-mirrors

I&apos;m syncing them with the upstream sources every 15 minutes using a
Windows box at home.  I have a (git) bash script containing the
following:

&gt; #!/bin/sh
&gt;
&gt; # File: sync_mirrors.sh
&gt;
&gt; for repo in `find . -name &quot;*.git&quot; -a -type d`; do
&gt;     (cd $repo; git fetch; git push --mirror github)
&gt; done

I run it from the Windows Task Scheduler such that it gets invoked as:

&gt; &quot;c:\Program Files (x86)\Git\bin\sh.exe&quot; --login sync_mirrors.sh

Note: It&apos;s important to include &apos;--login&apos; in the git bash invocation, or
else the environment won&apos;t be set up correctly.  Also, as mentioned
previously, the repos on the Windows box *must* be bare repos, because
it&apos;s not possible to create a working copy on Windows (due to invalid
characters in the file names).

The script is simple because all the repos have a consistent config.
Here&apos;s the one for poky:

&gt; $ cat poky.git/config
&gt; [core]
&gt;         repositoryformatversion = 0
&gt;         filemode = false
&gt;         bare = true
&gt;         symlinks = false
&gt;         ignorecase = true
&gt;         hideDotFiles = dotGitOnly
&gt; [remote &quot;origin&quot;]
&gt;         fetch = +refs/*:refs/*
&gt;         mirror = true
&gt;         url = git://git.yoctoproject.org/poky.git
&gt; [remote &quot;github&quot;]
&gt;         url = git@github.com:yoctoproject-mirrors/poky.git
&gt;         fetch = +refs/heads/*:refs/remotes/github/*

Thus, they all have a remote named &apos;github&apos; pointing at
&apos;github.com/yoctoproject-mirrors&apos;.

Oh, yeah---I also needed to set up a an SSH key with an empty passphrase
for this, and upload it to the yoctoproject-mirrors account on github.
Otherwise, the push(es) fail with authentication errors.

It&apos;s the weekend, so there haven&apos;t yet been any commits I can use to
confirm whether this setup is working. But I *think* it is...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>