[elbe-devel] [PATCH v2 3/3] elbepack: elbeproject.py: build sources with pbuilder

viraj viraj.shah at linutronix.de
Thu Sep 15 13:07:46 CEST 2022



On 9/15/22 12:49, Bastian Germann wrote:
> Am 15.09.22 um 12:40 schrieb viraj:
>>
>>
>> On 8/30/22 02:28, Bastian Germann wrote:
>>> Am 01.08.22 um 16:32 schrieb Viraj Shah:
>>>> * Changing directory to pbuilder path and doing "apt-get source"
>>>> results
>>>>     in using the mirrors from the initvm and not from the target
>>>> mirrors.
>>>> * Use chroot instead. Build env, and use chroot to use the target
>>>> mirror
>>>>     configured in xml file.
>>>> * Add dependency of dpkg-dev that would be used in later step for
>>>>     apt-get  source.
>>>> * Once the package source is downloaded in chroot, move it to the
>>>>     pbuilder enviornment where the source package should belong. And
>>>
>>> Typo: environment
>>>
>>>>     remove the unnecessary files later.
>>>>
>>>> Signed-off-by: Viraj Shah <viraj.shah at linutronix.de>
>>>
>>> Again, the subject does not describe the changes.
>>>
>>>> ---
>>>>    elbepack/elbeproject.py | 12 ++++++++++--
>>>>    1 file changed, 10 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
>>>> index aec56f0a8..59ea55a4f 100644
>>>> --- a/elbepack/elbeproject.py
>>>> +++ b/elbepack/elbeproject.py
>>>> @@ -417,7 +417,7 @@ class ElbeProject:
>>>>            do("cd %s; chmod +x %s" % (self.builddir, n))
>>>>            do("cd %s; rm sdk.txz" % self.builddir)
>>>>    -    def pbuild(self, p):
>>>> +    def pbuild(self, p, build_bin=True, build_sources=True):
>>>
>>> I do not see build_bin being used. Why add it here?
>>> You have not switched the caller to hand over build_sources.
>>>
>>>>            self.pdebuild_init()
>>>>            src_path = os.path.join(self.builddir, "pdebuilder",
>>>> "current")
>>>>    @@ -439,7 +439,15 @@ class ElbeProject:
>>>>                apt_args = '--yes -q --download-only'
>>>>                if self.xml.prj.has('noauth'):
>>>>                    apt_args += ' --allow-unauthenticated'
>>>> -            do('cd "%s";apt-get source %s "%s"' % (pdb_path,
>>>> apt_args, src_uri))
>>>> +            do('mkdir -p "%s"' % self.chrootpath)
>>>> +            self.buildenv = BuildEnv(self.xml, self.chrootpath,
>>>> +                                     build_sources=build_sources,
>>>> clean=True)
>>>> +            cmd = ('/bin/apt-get update;/bin/apt-get install -y
>>>> dpkg-dev')
>>>
>>> Why do you install dpkg-dev here? apt-get is in package apt and should
>>> already be installed.
>>> Please use the path /usr/bin/apt-get.
>> In this case, the target rfs should be buster. Like you mentioned I also
>> checked oldstable (1.8.2.3) version does have dependency of dpkg-dev
>> listed in apt.
>> So, I am out of ideas, why it is not installed with apt.
>
> Please answer the question first why you would want to install
> dpkg-dev here.
> Without this, the apt-get call is void.

minicoredumper gives this error of dpkg-source , I don't know if it
should be considered generic
or package specific.

apt source minicoredumper
Reading package lists... Done
NOTICE: 'minicoredumper' packaging is maintained in the 'Git' version
control system at:
https://salsa.debian.org/jogness-guest/minicoredumper.git
Please use:
git clone https://salsa.debian.org/jogness-guest/minicoredumper.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 308 kB of source archives.
Get:1 http://cdn-fastly.deb.debian.org/debian buster/main minicoredumper
2.0.1-1 (dsc) [2461 B]
Get:2 http://cdn-fastly.deb.debian.org/debian buster/main minicoredumper
2.0.1-1 (tar) [292 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster/main minicoredumper
2.0.1-1 (asc) [490 B]
Get:4 http://cdn-fastly.deb.debian.org/debian buster/main minicoredumper
2.0.1-1 (diff) [13.4 kB]
Fetched 308 kB in 2s (129 kB/s)           
sh: 1: dpkg-source: not found
W: Download is performed unsandboxed as root as file
'minicoredumper_2.0.1-1.dsc' couldn't be accessed b
y user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Unpack command 'dpkg-source --no-check -x minicoredumper_2.0.1-1.dsc'
failed.
N: Check if the 'dpkg-dev' package is installed.

>
>>
>>>
>>>> +            chroot(self.chrootpath, cmd)
>>>> +            cmd = ('/bin/apt-get source %s "%s"'% (apt_args,
>>>> src_uri))
>>>> +            chroot(self.chrootpath, cmd)
>>>> +            do('mv "%s"/%s* "%s"' % (self.chrootpath, src_uri,
>>>> pdb_path))
>>>> +            do('rm -rf "%s"' % (self.chrootpath))
>>>>                  do('dpkg-source -x %s/*.dsc "%s"' % (pdb_path,
>>>> src_path))
>>>>            else:
>>>
>>> I have integrated the previous two patches so that you can only send
>>> this one in v3.
>>> _______________________________________________
>>

-- 
Viraj Shah
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 16; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br. HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list