• Bug#1108881: --extra-repository="deb foo.. writes quotes to sources.lis

    From Marc Haber@21:1/5 to All on Sun Jul 6 19:50:01 2025
    Package: sbuild
    Version: 0.89.3
    Severity: normal

    Hi,

    when I call sbuild --extra-repository="deb http://my.host/debian suite component", the quotes end up in /etc/apt/sources.list.d/sbuild-extra-repositories.list which is
    syntactically incorrect.

    Wrapping arguments containing spaces in quotes is a rather common idiom. sbuild's behavior is a surprise here.

    And it would really be nice if sbuild -D would give in the debug output
    what actually gets written to the sbuild-extra-repositories.list file,
    that would have saved me an hour of debugging and pulling the strong
    from an strace.

    Greetings
    Marc


    -- System Information:
    Debian Release: 13.0
    APT prefers testing-security
    APT policy: (500, 'testing-security'), (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.15.4-zgsrv20080 (SMP w/6 CPU threads; PREEMPT)
    Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages sbuild depends on:
    ii adduser 3.152
    ii libsbuild-perl 0.89.3
    ii perl 5.40.1-5

    Versions of packages sbuild recommends:
    ii autopkgtest 5.49
    ii debootstrap 1.0.141
    ii iproute2 6.15.0-1
    ii mmdebstrap 1.5.7-1
    ii schroot 1.6.13-7
    ii uidmap 1:4.17.4-2

    Versions of packages sbuild suggests:
    ii e2fsprogs 1.47.2-3+b1
    ii kmod 34.2-2
    ii wget 1.25.0-2

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Hofstaedtler@21:1/5 to All on Sun Jul 6 20:20:01 2025
    Hello Marc,

    * Marc Haber <[email protected]> [250706 19:49]:
    when I call sbuild --extra-repository="deb http://my.host/debian suite >component", the quotes end up in >/etc/apt/sources.list.d/sbuild-extra-repositories.list which is
    syntactically incorrect.

    Wrapping arguments containing spaces in quotes is a rather common idiom. >sbuild's behavior is a surprise here.

    I tried reproducing this, but failed. My understanding is that this
    quoting style is usually necessary because of what your shell would
    otherwise do the argument (split it). Thus I assume you are running
    the given example from such a shell, like bash.

    I hacked up ResolverBase.pm to print out the file that was created,
    and got this:

    $ sbuild --extra-repository="deb deb http://my.host/debian suite component" -d unstable hello
    ...
    I: Setting up apt archive...


    deb deb http://my.host/debian suite component


    So, no quotes here.

    Maybe your invocation is different. Can you provide a full
    reproducer, and how you found out about the extra quotes?

    Best,
    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)