This short series of patches improves the reliability of the submodule handling to cope with various dev env scenarios that have since emerged v2: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg06272.html Changed in v3: - Avoid use of mktemp - Use '=' instead of '==' (bashism) in conditional tests - Fix problem with short-circuiting for empty submodule list - Ensure help message is displayed on all errors Daniel P. Berrange (5): build: allow setting a custom GIT binary for transparent proxying build: don't create temporary files in source dir build: allow automatic git submodule updates to be disabled build: don't fail if given a git submodule which does not exist build: delay check for empty git submodule list Makefile | 15 ++++++++-- configure | 12 ++++++++ scripts/git-submodule.sh | 72 ++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 83 insertions(+), 16 deletions(-) -- 2.13.6
On 3 November 2017 at 15:33, Daniel P. Berrange <berrange@redhat.com> wrote: > This short series of patches improves the reliability of the submodule > handling to cope with various dev env scenarios that have since emerged Can I ask you to write up a bit for the release notes at https://wiki.qemu.org/ChangeLog/2.11#Build_Information covering what users need to know about the new submodule handling, please? thanks -- PMM
On Fri, Nov 03, 2017 at 06:03:55PM +0000, Peter Maydell wrote: > On 3 November 2017 at 15:33, Daniel P. Berrange <berrange@redhat.com> wrote: > > This short series of patches improves the reliability of the submodule > > handling to cope with various dev env scenarios that have since emerged > > Can I ask you to write up a bit for the release notes at > https://wiki.qemu.org/ChangeLog/2.11#Build_Information > covering what users need to know about the new submodule > handling, please? Certainly, will do that. Perhaps have something in the general wiki pages about building QEMU, and link to it from the changelog. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On Mon, Nov 06, 2017 at 10:44:01AM +0000, Daniel P. Berrange wrote: > On Fri, Nov 03, 2017 at 06:03:55PM +0000, Peter Maydell wrote: > > On 3 November 2017 at 15:33, Daniel P. Berrange <berrange@redhat.com> wrote: > > > This short series of patches improves the reliability of the submodule > > > handling to cope with various dev env scenarios that have since emerged > > > > Can I ask you to write up a bit for the release notes at > > https://wiki.qemu.org/ChangeLog/2.11#Build_Information > > covering what users need to know about the new submodule > > handling, please? > > Certainly, will do that. > > Perhaps have something in the general wiki pages about building QEMU, and > link to it from the changelog. I've created this now: https://wiki.qemu.org/Documentation/GitSubmodules and linked it from here: https://wiki.qemu.org/ChangeLog/2.11#Build_Information and a couple of other places in the wiki. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On 07/11/17 01:30, Daniel P. Berrange wrote: > On Mon, Nov 06, 2017 at 10:44:01AM +0000, Daniel P. Berrange wrote: >> On Fri, Nov 03, 2017 at 06:03:55PM +0000, Peter Maydell wrote: >>> On 3 November 2017 at 15:33, Daniel P. Berrange <berrange@redhat.com> wrote: >>>> This short series of patches improves the reliability of the submodule >>>> handling to cope with various dev env scenarios that have since emerged >>> >>> Can I ask you to write up a bit for the release notes at >>> https://wiki.qemu.org/ChangeLog/2.11#Build_Information >>> covering what users need to know about the new submodule >>> handling, please? >> >> Certainly, will do that. >> >> Perhaps have something in the general wiki pages about building QEMU, and >> link to it from the changelog. > > I've created this now: > > https://wiki.qemu.org/Documentation/GitSubmodules This could probably also mention something like this workaround if things do not work as expected: git config --global --replace-all core.abbrev 8 Thanks. > > and linked it from here: > > https://wiki.qemu.org/ChangeLog/2.11#Build_Information > > and a couple of other places in the wiki. > > Regards, > Daniel > -- Alexey
On 04/11/17 02:33, Daniel P. Berrange wrote: > This short series of patches improves the reliability of the submodule > handling to cope with various dev env scenarios that have since emerged > > v2: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg06272.html > > Changed in v3: > > - Avoid use of mktemp > - Use '=' instead of '==' (bashism) in conditional tests > - Fix problem with short-circuiting for empty submodule list > - Ensure help message is displayed on all errors > > Daniel P. Berrange (5): > build: allow setting a custom GIT binary for transparent proxying > build: don't create temporary files in source dir > build: allow automatic git submodule updates to be disabled > build: don't fail if given a git submodule which does not exist > build: delay check for empty git submodule list > > Makefile | 15 ++++++++-- > configure | 12 ++++++++ > scripts/git-submodule.sh | 72 ++++++++++++++++++++++++++++++++++++++---------- > 3 files changed, 83 insertions(+), 16 deletions(-) It is getting more complicated. So, same setup, git checkout v2.10.0 ./configure --target-list=ppc64-softmmu make All good. Then: git checkout git-submodule (upstream + this patchset) ./configure --target-list=ppc64-softmmu I see an error and educational page about --disable-git-update, good. ./configure --target-list=ppc64-softmmu --disable-git-update make Now I get: GIT submodule checkout is out of date. Please run scripts/git-submodule.sh update ui/keycodemapdb dtc capstone from the source directory checkout /home/aik/p/qemu Good, as I wanted. I do this on the server: scripts/git-submodule.sh update ui/keycodemapdb dtc capstone and repeat "make" on the build machine but get the very same error. Then I add "set -x" to scripts/git-submodule.sh and see: + substat=.git-submodule-status + command=status + shift + maybe_modules=ui/keycodemapdb dtc capstone + test -z git + modules= + git submodule status ui/keycodemapdb + test 0 = 0 + modules= ui/keycodemapdb + git submodule status dtc + test 0 = 0 + modules= ui/keycodemapdb dtc + git submodule status capstone + test 0 = 0 + modules= ui/keycodemapdb dtc capstone + test -n ui/keycodemapdb dtc capstone + test -e .git + test -z ui/keycodemapdb dtc capstone + test -f .git-submodule-status + git submodule status ui/keycodemapdb dtc capstone + CURSTATUS=-22ead3e0bfdb87516656453336160e0a37b066bf capstone 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4) 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master) + cat .git-submodule-status + OLDSTATUS= 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4) 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master) + test -22ead3e0bfdb87516656453336160e0a37b066bf capstone 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4) 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master) = 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4) 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master) + exit 1 What is that new module - capstone - about? It is not in the status file: [vpl1 qemu]$ cat .git-submodule-status 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4) 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master) -- Alexey
On 06/11/17 11:22, Alexey Kardashevskiy wrote:
> On 04/11/17 02:33, Daniel P. Berrange wrote:
>> This short series of patches improves the reliability of the submodule
>> handling to cope with various dev env scenarios that have since emerged
>>
>> v2: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg06272.html
>>
>> Changed in v3:
>>
>> - Avoid use of mktemp
>> - Use '=' instead of '==' (bashism) in conditional tests
>> - Fix problem with short-circuiting for empty submodule list
>> - Ensure help message is displayed on all errors
>>
>> Daniel P. Berrange (5):
>> build: allow setting a custom GIT binary for transparent proxying
>> build: don't create temporary files in source dir
>> build: allow automatic git submodule updates to be disabled
>> build: don't fail if given a git submodule which does not exist
>> build: delay check for empty git submodule list
>>
>> Makefile | 15 ++++++++--
>> configure | 12 ++++++++
>> scripts/git-submodule.sh | 72 ++++++++++++++++++++++++++++++++++++++----------
>> 3 files changed, 83 insertions(+), 16 deletions(-)
>
>
> It is getting more complicated.
>
> So, same setup,
> git checkout v2.10.0
> ./configure --target-list=ppc64-softmmu
> make
>
> All good.
> Then:
>
> git checkout git-submodule (upstream + this patchset)
> ./configure --target-list=ppc64-softmmu
>
> I see an error and educational page about --disable-git-update, good.
> ./configure --target-list=ppc64-softmmu --disable-git-update
> make
>
> Now I get:
>
> GIT submodule checkout is out of date. Please run
> scripts/git-submodule.sh update ui/keycodemapdb dtc capstone
> from the source directory checkout /home/aik/p/qemu
>
> Good, as I wanted.
> I do this on the server:
> scripts/git-submodule.sh update ui/keycodemapdb dtc capstone
>
> and repeat "make" on the build machine but get the very same error. Then I
> add "set -x" to scripts/git-submodule.sh and see:
>
> + substat=.git-submodule-status
> + command=status
> + shift
> + maybe_modules=ui/keycodemapdb dtc capstone
> + test -z git
> + modules=
> + git submodule status ui/keycodemapdb
> + test 0 = 0
> + modules= ui/keycodemapdb
> + git submodule status dtc
> + test 0 = 0
> + modules= ui/keycodemapdb dtc
> + git submodule status capstone
> + test 0 = 0
> + modules= ui/keycodemapdb dtc capstone
> + test -n ui/keycodemapdb dtc capstone
> + test -e .git
> + test -z ui/keycodemapdb dtc capstone
> + test -f .git-submodule-status
> + git submodule status ui/keycodemapdb dtc capstone
> + CURSTATUS=-22ead3e0bfdb87516656453336160e0a37b066bf capstone
> 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4)
> 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master)
>
> + cat .git-submodule-status
> + OLDSTATUS= 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4)
> 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master)
>
> + test -22ead3e0bfdb87516656453336160e0a37b066bf capstone
> 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4)
> 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master) =
> 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4)
> 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master)
>
> + exit 1
>
>
> What is that new module - capstone - about? It is not in the status file:
>
> [vpl1 qemu]$ cat .git-submodule-status
> 558cd81bdd432769b59bff01240c44f82cfb1a9d dtc (v1.4.4)
> 10739aa26051a5d49d88132604539d3ed085e72e ui/keycodemapdb (heads/master)
Ufff, that was inaccurate me, sorry for the noise. This is a real thing:
[vpl1 qemu]$ git submodule status capstone
22ead3e0bfdb87516656453336160e0a37b066bf capstone (3.0.5-rc3-14-g22ead3e0)
[vpl1 qemu]$ ssh garrison2 git -C p/qemu submodule status capstone
22ead3e0bfdb87516656453336160e0a37b066bf capstone (3.0.5-rc3-14-g22ead3e)
So now I have to add this to .gitconfig on all build machines:
[core]
abbrev=10
as "git submodule status" simply calls "git describe" which does not take
"--abbrev". Well, ok :(
--
Alexey
On 11/03/2017 12:33 PM, Daniel P. Berrange wrote: > This short series of patches improves the reliability of the submodule > handling to cope with various dev env scenarios that have since emerged > > v2: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg06272.html > > Changed in v3: > > - Avoid use of mktemp > - Use '=' instead of '==' (bashism) in conditional tests > - Fix problem with short-circuiting for empty submodule list > - Ensure help message is displayed on all errors > > Daniel P. Berrange (5): > build: allow setting a custom GIT binary for transparent proxying > build: don't create temporary files in source dir > build: allow automatic git submodule updates to be disabled > build: don't fail if given a git submodule which does not exist > build: delay check for empty git submodule list Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
© 2016 - 2025 Red Hat, Inc.