Bug#867822: pbuilder: pdebuild cannot build source-only packages

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#867822: pbuilder: pdebuild cannot build source-only packages

Sven Joachim
Package: pbuilder
Version: 0.228.7
Severity: normal

Passing "--debbuildopts -S" to pdebuild does not currently work, because
that produces a *_source.changes file while pbuilder expects a
*_${ARCH}.changes:

,----
| $ pdebuild --debbuildopts -S
| W: /home/sven/.pbuilderrc does not exist
| [...]
|  dpkg-source -i -b ncurses-6.0+20161126
| dpkg-source: info: using source format '3.0 (quilt)'
| dpkg-source: info: building ncurses using existing ./ncurses_6.0+20161126.orig.tar.gz
| dpkg-source: info: building ncurses in ncurses_6.0+20161126-1+deb9u1.debian.tar.xz
| dpkg-source: info: building ncurses in ncurses_6.0+20161126-1+deb9u1.dsc
|  dpkg-genbuildinfo --build=source
|  dpkg-genchanges --build=source >../ncurses_6.0+20161126-1+deb9u1_source.changes
| dpkg-genchanges: info: not including original source code in upload
|  dpkg-source -i --after-build ncurses-6.0+20161126
| dpkg-buildpackage: info: binary and diff upload (original source NOT included)
| I: copying local configuration
| E: Missing changes file: /var/cache/pbuilder/build/26303/build/ncurses_6.0+20161126-1+deb9u1_i386.changes
`----

Now I _can_ of course produce the source package outside of pbuilder,
but it would be nicer and safer to build it in a chroot dedicated to the
distribution the upload is intended for.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.12.0-nouveau (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pbuilder depends on:
ii  cdebootstrap  0.7.7+b1
ii  debconf       1.5.62
ii  debootstrap   1.0.90
ii  dpkg-dev      1.18.24
ii  wget          1.19.1-4

Versions of packages pbuilder recommends:
ii  devscripts  2.17.7
ii  eatmydata   105-5
ii  fakeroot    1.21-3.1
ii  iproute2    4.9.0-1
ii  net-tools   1.60+git20161116.90da8a0-1
ii  sudo        1.8.20p2-1

Versions of packages pbuilder suggests:
pn  cowdancer   <none>
pn  gdebi-core  <none>

-- debconf information:
* pbuilder/mirrorsite: http://ftp.de.debian.org/debian/
* pbuilder/rewrite: false
  pbuilder/nomirror:

Reply | Threaded
Open this post in threaded view
|

Bug#867822: pbuilder: pdebuild cannot build source-only packages

James Clarke-2
> On 9 Jul 2017, at 19:31, Sven Joachim <[hidden email]> wrote:
>
> Package: pbuilder
> Version: 0.228.7
> Severity: normal
>
> Passing "--debbuildopts -S" to pdebuild does not currently work, because
> that produces a *_source.changes file while pbuilder expects a
> *_${ARCH}.changes:
>
> ,----
> | $ pdebuild --debbuildopts -S
> | W: /home/sven/.pbuilderrc does not exist
> | [...]
> |  dpkg-source -i -b ncurses-6.0+20161126
> | dpkg-source: info: using source format '3.0 (quilt)'
> | dpkg-source: info: building ncurses using existing ./ncurses_6.0+20161126.orig.tar.gz
> | dpkg-source: info: building ncurses in ncurses_6.0+20161126-1+deb9u1.debian.tar.xz
> | dpkg-source: info: building ncurses in ncurses_6.0+20161126-1+deb9u1.dsc
> |  dpkg-genbuildinfo --build=source
> |  dpkg-genchanges --build=source >../ncurses_6.0+20161126-1+deb9u1_source.changes
> | dpkg-genchanges: info: not including original source code in upload
> |  dpkg-source -i --after-build ncurses-6.0+20161126
> | dpkg-buildpackage: info: binary and diff upload (original source NOT included)
> | I: copying local configuration
> | E: Missing changes file: /var/cache/pbuilder/build/26303/build/ncurses_6.0+20161126-1+deb9u1_i386.changes
> `----
>
> Now I _can_ of course produce the source package outside of pbuilder,
> but it would be nicer and safer to build it in a chroot dedicated to the
> distribution the upload is intended for.

Hi Sven,
A few things:

 1. Building the source package on its own locally isn't good practice; you
    should really be building the binary packages too as part of the build to
    check it works, and then uploading just the source; you can do this with
    pdebuild -- --source-only-changes (or SOURCE_ONLY_CHANGES=yes in your
    pbuilderrc).

 2. Why are you building the source package on its own with pbuilder, anyway?
    To copy the source into the chroot, the source package already first gets
    built outside the chroot, and there really should not be a difference in
    the resulting source package. But, if you follow my advice in 1., you do
    get to upload the .dsc built inside the chroot.

I have yet to hear a convincing argument in favour of supporting --debbuildopts
-S, but that doesn't mean there isn't one, so I'm open to being convinced
otherwise (and I'm sure Mattia is too).

Regards,
James

Reply | Threaded
Open this post in threaded view
|

Bug#867822: pbuilder: pdebuild cannot build source-only packages

Sven Joachim
On 2017-07-09 19:48 +0100, James Clarke wrote:

>> On 9 Jul 2017, at 19:31, Sven Joachim <[hidden email]> wrote:
>>
>> Package: pbuilder
>> Version: 0.228.7
>> Severity: normal
>>
>> Passing "--debbuildopts -S" to pdebuild does not currently work, because
>> that produces a *_source.changes file while pbuilder expects a
>> *_${ARCH}.changes:
>>
>> ,----
>> | $ pdebuild --debbuildopts -S
>> | W: /home/sven/.pbuilderrc does not exist
>> | [...]
>> |  dpkg-source -i -b ncurses-6.0+20161126
>> | dpkg-source: info: using source format '3.0 (quilt)'
>> | dpkg-source: info: building ncurses using existing ./ncurses_6.0+20161126.orig.tar.gz
>> | dpkg-source: info: building ncurses in ncurses_6.0+20161126-1+deb9u1.debian.tar.xz
>> | dpkg-source: info: building ncurses in ncurses_6.0+20161126-1+deb9u1.dsc
>> |  dpkg-genbuildinfo --build=source
>> |  dpkg-genchanges --build=source >../ncurses_6.0+20161126-1+deb9u1_source.changes
>> | dpkg-genchanges: info: not including original source code in upload
>> |  dpkg-source -i --after-build ncurses-6.0+20161126
>> | dpkg-buildpackage: info: binary and diff upload (original source NOT included)
>> | I: copying local configuration
>> | E: Missing changes file: /var/cache/pbuilder/build/26303/build/ncurses_6.0+20161126-1+deb9u1_i386.changes
>> `----
>>
>> Now I _can_ of course produce the source package outside of pbuilder,
>> but it would be nicer and safer to build it in a chroot dedicated to the
>> distribution the upload is intended for.
>
> Hi Sven,
> A few things:
>
>  1. Building the source package on its own locally isn't good practice; you
>     should really be building the binary packages too as part of the build to
>     check it works, and then uploading just the source; you can do this with
>     pdebuild -- --source-only-changes (or SOURCE_ONLY_CHANGES=yes in your
>     pbuilderrc).

I don't know everybody else's workflow, but with mine this is a waste of
time and CPU cycles, for the one and only change after building and
testing the packages is to edit debian/changelog and get rid of that
"UNRELEASED" string there.  Why should I build the binaries again if I
had verified that this works just six hours ago?

>  2. Why are you building the source package on its own with pbuilder, anyway?
>     To copy the source into the chroot, the source package already first gets
>     built outside the chroot, and there really should not be a difference in
>     the resulting source package.

Certainly there _should_ not be a difference, but at least the
.buildinfo file will be vastly different, and there's also the
possibility of format upgrades in the .changes file.

> But, if you follow my advice in 1., you do
>     get to upload the .dsc built inside the chroot.

There seem to be two problems with that, the issue of ftp-masters not
liking the combination of _source.changes and _${ARCH}.buildinfo (see
the recent thread "Bad interaction between
pbuilder/debhelper/dpkg-buildinfo/dpkg-genchanges and dak on
security-master" in which you participated) and the fact that
"--debbuildopts -g" is not compatible with "- --source-only-changes", as
I have just discovered.  For jessie AFAIK source-only uploads are not
allowed and you have to at least include arch-independent binaries (if
any).

Cheers,
       Sven

Reply | Threaded
Open this post in threaded view
|

Bug#867822: pbuilder: pdebuild cannot build source-only packages

Milan Kupcevic-2
In reply to this post by James Clarke-2
On Sun, 9 Jul 2017 19:48:41 +0100 James Clarke <[hidden email]> wrote:

[...]

>
> I have yet to hear a convincing argument in favour of supporting
> --debbuildopts -S, but that doesn't mean there isn't one, so I'm open
> to being convinced otherwise (and I'm sure Mattia is too).
>

Because dpkg-buildpackage and debuild fully support the "-S" option.

Pdebuild used to do it fine, it fails now.


Milan


signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#867822: /usr/bin/pdebuild: Re: pbuilder: pdebuild cannot build source-only packages

Ritesh Raj Sarraf-4
In reply to this post by Sven Joachim
Package: pbuilder
Version: 0.230.4
Followup-For: Bug #867822

I have run into the same problem and would appreciate if this issue was
resolved. For one, there's always a (good) reason for people to be doing
source-only uploads. There are many Debian derivaties.

Secondly, there's a large number of packages I'd love to see only be
uploaded through source-only uploads. Especially the ones like node-*,
and the Java ones.

Third, like many others have said, for many packages it is a complete
waste of resources. For example, I had the same problem when maintaining
Virtualbox. And, as you see below, the same problem with my current
package: user-mode-linux

And then, in DBug #928924, you could see another good reason why some
want source only uploads.

So please, it'd really help a good many DDs, who have reasons to prefer
source-only uploads.


Thanks,
Ritesh

========================================
Setting up fakeroot (1.23-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Processing triggers for man-db (2.8.5-2) ...
Not building database; man-db/auto-update is not 'true'.
Processing triggers for libc-bin (2.28-10) ...
I: Building the package
I: Running cd /build/user-mode-linux-4.19-1um/ && env PATH="/usr/lib/ccache:/usr/sbin:/usr/bin:/sbin:/bin" HOME="/nonexistent" dpkg-buildpackage -us -uc  -S
dpkg-buildpackage: info: source package user-mode-linux
dpkg-buildpackage: info: source version 4.19-1um-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Ritesh Raj Sarraf <[hidden email]>
 dpkg-source --before-build .
 fakeroot debian/rules clean
(cd linux-source-4.19 && QUILT_PATCHES=/build/user-mode-linux-4.19-1um/debian/patches quilt pop -a || /bin/true)
/bin/sh: 1: cd: can't cd to linux-source-4.19
rm -rf patch-stamp linux-source-4.19/.pc
dh_testdir
dh_testroot
rm -f unpack-stamp build-stamp configure-stamp
rm -rf linux-source-4.19 linux.uml.1 /build/user-mode-linux-4.19-1um/debian/uml-modules changelog
dh_clean
 dpkg-source -b .
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format '1.0'
dpkg-source: info: building user-mode-linux in user-mode-linux_4.19-1um-1.tar.gz
dpkg-source: info: building user-mode-linux in user-mode-linux_4.19-1um-1.dsc
 dpkg-genbuildinfo --build=source
 dpkg-genchanges --build=source >../user-mode-linux_4.19-1um-1_source.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build .
dpkg-buildpackage: info: source-only upload: Debian-native package
I: copying local configuration
E: Missing changes file: /tmp//13390/build/user-mode-linux_4.19-1um-1_amd64.changes
I: unmounting /var/cache/apt/archives/ filesystem
========================================

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_USER
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pbuilder depends on:
ii  debconf [debconf-2.0]  1.5.71
ii  debootstrap            1.0.114
ii  dpkg-dev               1.19.6

Versions of packages pbuilder recommends:
ii  devscripts  2.19.5
ii  eatmydata   105-7
ii  fakeroot    1.23-1
ii  iproute2    4.20.0-2
ii  net-tools   1.60+git20180626.aebd88e-1
ii  sudo        1.8.27-1

Versions of packages pbuilder suggests:
pn  cowdancer   <none>
ii  gdebi-core  0.9.5.7+nmu3

-- debconf information:
* pbuilder/rewrite: false
  pbuilder/nomirror:
* pbuilder/mirrorsite: http://deb.debian.org/debian

Reply | Threaded
Open this post in threaded view
|

Bug#867822: /usr/bin/pdebuild: Re: pbuilder: pdebuild cannot build source-only packages

James Clarke-2
Control: retitle -1 pbuilder: Breaks with --debbuildopts -S
Control: tags -1 wontfix

On 16 May 2019, at 15:18, Ritesh Raj Sarraf <[hidden email]> wrote:

>
> Package: pbuilder
> Version: 0.230.4
> Followup-For: Bug #867822
>
> I have run into the same problem and would appreciate if this issue was
> resolved. For one, there's always a (good) reason for people to be doing
> source-only uploads. There are many Debian derivaties.
>
> Secondly, there's a large number of packages I'd love to see only be
> uploaded through source-only uploads. Especially the ones like node-*,
> and the Java ones.
>
> Third, like many others have said, for many packages it is a complete
> waste of resources. For example, I had the same problem when maintaining
> Virtualbox. And, as you see below, the same problem with my current
> package: user-mode-linux
>
> And then, in DBug #928924, you could see another good reason why some
> want source only uploads.
>
> So please, it'd really help a good many DDs, who have reasons to prefer
> source-only uploads.

Please read the entire thread, in particular [1]. If you want to do a
source-only upload without building binaries at the same time, just use
`dpkg-buildpackage -S`. I really don't think `pdebuild --debbuildopts -S` is a
useful thing to be doing; it's a waste of time with added complexity. We
support source-only uploads using pdebuild/pbuilder with --source-only-changes,
so please do not erroneously assert that we do not support source-only uploads.
We do. But using a chroot to just build a source package is, in my opinion,
pointless (unless using something like --use-pdebuild-internal, but that's
fairly obscure and not so well maintained).

Regards,
James

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867822#10