I find it helpful to be able to build the linux-media modules
for a kernel other than the one I am currently running.
This is a resend of the patch that in two previous attempts
made it into patchwork but the text was line-wrapped.
Those patches should be dropped.
https://patchwork.linuxtv.org/patch/59979/https://patchwork.linuxtv.org/patch/60186/
There are no differences in the patch, just the submission email.
Apologies for all the noise.
Signed-off-by: Vincent McIntyre <media@arewethere.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Almost all git commands now use run() instead of system().
Do the same change for the main git clone command.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
While debugging another issue I found this change helpful.
Original send Date: Thu, 1 Jun 2017 20:44:27 +1000
Make check_git() give more information in verbose mode.
Signed-off-by: Vincent McIntyre <vincent.mcintyre@gmail.com>
While debugging a recent issue I wanted more complete information
about the sequencence of events in a series of calls like
system("foo") or die("BAR")
Adding this helper did that and cleaned things up a little.
Signed-off-by: Vincent McIntyre <vincent.mcintyre@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Commit 6b4a9c5 indroduced the --depth parameter to limit the commit history
pulled by when cloning, giving a nice speedup. But in the process it broke
running without the --depth parameter. The first invocation of
'./build --main-git' works fine, but the second falls over like so:
fatal: No such remote or remote group: media_tree/master
Can't update from the upstream tree at ./build line 430.
The fix is to check whether that remote has been defined before trying
to update from it.
Signed-off-by: Vincent McIntyre <vincent.mcintyre@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cloning a tree with --depth will help to reduce bandwidth
usage for downloads and tree size.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cloning a tree with --depth will help to reduce bandwidth
usage for downloads and tree size.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Remove my legacy emails from the files, and point to the ML
for bug reports, as bug fixes will be better tracked there.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
In the case of local branch, it will try to reduce the amount
of data copied, by just creating a new workdir, if git-new-workdir
is on the path. Otherwise, it will just create a new clone of
a local tree.
Every time build is called using a new-workdir, it will reset
the branch to point to the named branch. So, any changes at
the git workdir under media will be lost.
Of course, git reflog can be used to recover the old patches,
if needed.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
git remote add doesn't have a branch argument. This doesn't fail
with some git versions, but others are more pedantic.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
As reported by leo@lumanate.com:
leo@ubaduba:~/ltv3/media_build$ ./build --main-git --verbose
...
creating a local branch media_tree
$ git --git-dir media/.git branch
$ (cd media; git checkout -b media_tree/staging/for_v3.9
remotes/r_media_tree/staging/for_v3.9)
fatal: git checkout: updating paths is incompatible with switching
branches.
Did you intend to checkout 'remotes/r_media_tree/staging/for_v3.9' which
can not be resolved as commit?
Can't create local branch media_tree at ./build line 405.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
I was trying to install Linux TV Kernel Modules via your media_build
git repo/scripts. Since I am on openSUSE and there are no installation
hints yet, and I needed to look up the correct packages anyways, here
is a small patch that adds the corresponding infomation to your script.
I hope, the formulation for adding the perl buildservice repository
(something like Ubuntu's PPAs) is clear enough. Please also be warned,
that I never did anything in perl yet, so I don't know if I chose the
best/perl way to add the repo message.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
On Debian I did:
$ git clone git://linuxtv.org/media_build.git
$ ./media_build/build
Checking if the needed tools are present
...
I don't know distro . So, I can't provide you a hint with the package names.
Debian uses /etc/issue to store the distro name, patch below:
$ diff -Naur media_build/build.orig media_build/build
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Update to build script to give Debian users the Ubunutu package
hints. The aptitude package names are the same.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Debian removed Digest::SHA1, in favor of Digest::SHA.
According with:
http://stackoverflow.com/questions/3420720/what-are-the-advantages-of-digestsha-over-digestsha1
Digest::SHA is part of the perl-core and has a better implementation.
I double-checked it on Fedora distros and RHEL6: at least since Fedora 12
and on RHEL6, both packages are there. As Ubuntu generally follows Debian,
the package should also be there.
So, let's just use the Digest::SHA module.
Please, report if your distro comes with a kernel >= 2.6.32 but the ::SHA1
module is not supported there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As suggested by hotwings, use lsb_release by default, as a way
to detect the distribution type. This tool seems to be available on
a broad range of distros, but, as it might not be installed, the
logic still needs to fallback to use the old methods.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>