Re: upstream

78 views
Skip to first unread message

Marek Marczykowski-Górecki

unread,
Nov 5, 2017, 11:51:13 AM11/5/17
to Frédéric Epitre, qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, Nov 05, 2017 at 05:41:17PM +0100, Frédéric Epitre wrote:
> Following the list of options I setup in my infrastructure, I made a
> script to add automatically the upstream branch following the same rules
> for branches: default is QubesOS github repo and we can specify another
> upstream for a specific repo e.g. UPSTREAM_linux_kernel =
> https://github.com/fepitre.
>
> How do you proceed? Do you think it would be useful to integrate it in
> the qubes-builder?

How exactly would that be handled? During get-sources? If you just want
to sync with upstream, it is already possible with something like:

make prepare-merge GIT_PREFIX=QubesOS/qubes-

It will give you upstream version in FETCH_HEAD (and verify its
signature!), and also display shortlog for each repository.
Creating separate "upstream" branch might introduce some additional
complexity, as you need to keep it in sync (when? how to handle
conflicts? how to change upstream branch/repo?).

PS CCing qubes-devel

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJZ/ECWAAoJENuP0xzK19csNrcIAJqP5iLIk9JlBmbV/prbZtXA
olWil/lfTwTa3+pT5mcy3eqdEU/XozkDpmUxyc6WlmR2HNxMmZbCYvr9V6SqwUe9
x+xiwzVuoV/Ic1kfknK5Vkue2uFkudRCjVX92CdqIkE25VjNV6RRbn2F9eHiCcE4
tow8zM1k1LiAVAWlR7ApIIzfdA9El9xeCk5PAy5/90JP2VJfHxnFapSR4xkKd64H
porix4YoXA3hjyH+XgXKXSNJK28lxBSocYWiiq3aRMzKR7aINWJMk53T8EKPNb3d
EjGhfFGIR9PCTdXD5RrHEU/e1OXvJjmhvY1fjawKHMo0tcv2POOFL9oN1Bw8qjA=
=GwoR
-----END PGP SIGNATURE-----

Frédéric Epitre

unread,
Nov 5, 2017, 12:07:29 PM11/5/17
to Marek Marczykowski-Górecki, qubes...@googlegroups.com
Yes it would be during get-sources or another target like add-upstream.
From what I read in the doc, to update every components from upstream, I
use make prepare-merge GIT_REMOTE=upstream. So this is why I added a
upstream remote for each components.

So maybe I missed something?

PS: Sorry I forgot to CC to the list

Marek Marczykowski-Górecki

unread,
Nov 5, 2017, 12:17:26 PM11/5/17
to Frédéric Epitre, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, Nov 05, 2017 at 06:07:26PM +0100, Frédéric Epitre wrote:
> Yes it would be during get-sources or another target like add-upstream.
> From what I read in the doc, to update every components from upstream, I
> use make prepare-merge GIT_REMOTE=upstream. So this is why I added a
> upstream remote for each components.

This is alternative: you can either use GIT_REMOTE - which require having
appropriate remote added (git remote add ...) in each repository, or
GIT_PREFIX - which does not.
Generally it is already possible with (slightly longer) one line.

So, your idea was to add remote, not a branch? That would work. But for
that IMHO it would be even better to have something more flexible,
possible to create multiple remotes everywhere, like:

GIT_REMOTES = upstream:https://github.com/QubesOS/qubes- \
marmarek:https://github.com/marmarek/qubes- \
fepitre:https://github.com/fepitre/qubes-

GIT_REMOTES_linux_kernel = ...

To be honest, I have one-liner script for that (for a single
repository):

git remote add $1 g...@github.com:$1/qubes-$(basename $PWD)

Usage, from desired repository:

add-remote fepitre

> PS: Sorry I forgot to CC to the list

Also, please don't top-post...

> Le 05/11/2017 à 17:51, Marek Marczykowski-Górecki a écrit :
> > On Sun, Nov 05, 2017 at 05:41:17PM +0100, Frédéric Epitre wrote:
> > > Following the list of options I setup in my infrastructure, I made a
> > > script to add automatically the upstream branch following the same rules
> > > for branches: default is QubesOS github repo and we can specify another
> > > upstream for a specific repo e.g. UPSTREAM_linux_kernel =
> > > https://github.com/fepitre.
> >
> > > How do you proceed? Do you think it would be useful to integrate it in
> > > the qubes-builder?
> >
> > How exactly would that be handled? During get-sources? If you just want
> > to sync with upstream, it is already possible with something like:
> >
> > make prepare-merge GIT_PREFIX=QubesOS/qubes-
> >
> > It will give you upstream version in FETCH_HEAD (and verify its
> > signature!), and also display shortlog for each repository.
> > Creating separate "upstream" branch might introduce some additional
> > complexity, as you need to keep it in sync (when? how to handle
> > conflicts? how to change upstream branch/repo?).
> >
> > PS CCing qubes-devel
> >
>

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJZ/Ea7AAoJENuP0xzK19csutsH/11tky39X+vLL8p5LwvKWqfj
ZnRSLMoZeEqRf6UTikFQxUP6E7rKQrNnxVWYH6WFyCp3TiotUwk+SFTh2v6LhB7M
nzbjIlvv8CZe+jhnDN4ktkXBpjQ3sf3hZjMtREubu6ZYV/NnhNpwZ0IsppKzxbFo
drkXFBFw+zw5ziaZFKaLaltRFh5DRZ0GRh5vLwiz6EoiC5PhZAAu1tJOjF24QM1I
mCFkDpclq2IocFMmjQOwxEFR836cNFmVlCBOHKftbLDJrd2SOtB8VyWdp7IjQXVK
1f9wsxfGbV1r+wo5OgHwigwhDgNuu7i2UySSHvvwNTo5XH0XZ+wvFI7DonlTOJE=
=B2Xz
-----END PGP SIGNATURE-----

Frédéric Pierret (fepitre)

unread,
Nov 5, 2017, 1:03:26 PM11/5/17
to qubes-devel


Le dimanche 5 novembre 2017 18:17:26 UTC+1, Marek Marczykowski-Górecki a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, Nov 05, 2017 at 06:07:26PM +0100, Frédéric Epitre wrote:
> Yes it would be during get-sources or another target like add-upstream.
> From what I read in the doc, to update every components from upstream, I
> use make prepare-merge GIT_REMOTE=upstream. So this is why I added a
> upstream remote for each components.

This is alternative: you can either use GIT_REMOTE - which require having
appropriate remote added (git remote add ...) in each repository, or
GIT_PREFIX - which does not.
Generally it is already possible with (slightly longer) one line.

So, your idea was to add remote, not a branch? That would work. But for
that IMHO it would be even better to have something more flexible,
possible to create multiple remotes everywhere, like:

Yes.
GIT_REMOTES = upstream:https://github.com/QubesOS/qubes- \
    marmarek:https://github.com/marmarek/qubes- \
    fepitre:https://github.com/fepitre/qubes-

GIT_REMOTES_linux_kernel = ...

To be honest, I have one-liner script for that (for a single
repository):

    git remote add $1 g...@github.com:$1/qubes-$(basename $PWD)

Usage, from desired repository:

    add-remote fepitre
Yes it is only a matter of doing such a simple thing. From my humble contributor point of view and opinion, I just found easier to have already prepared workspaces(builder) with upstream repositories for every components (especially if we have fork all the Qubes components and we use our GIT account as source) if needed when defining it in the builder.conf. Notably to update current workspace.
Reply all
Reply to author
Forward
0 new messages