How to add 'deb-src' repo to '/etc/apt/sources.list' ? buildd


Hii, I am trying to build roc-toolkit with pulseaudio support. But the problem is roc-toolkit need the pulseaudio source code to be build. This is why it itself has ability to download the source of pulseaudio. But the problem is as the Launchpad has no external internet aceess(?) It can't be downloaded. but the thing is I also can bundle pulseaudio with roc-toolkit source, but this will make everything a high main-tenant. I don't like that. Everytime if pulseaudio bumps its version, I've to make it available for roc-toolkit? And this make me to track pulseaudio also.

This is the PPA, Where I did all the tests :

The solution : How would be If I can include 'deb-src' repo into '/etc/apt/sources.list' of buildd chrooted launchpad build environment and download the source with 'apt source pulseaudio' ?

The problem of the above solution : But how to add those 'deb-src' repo ? as I can't do with in 'debian/rules'
sed 's/deb/deb-src/g' /etc/apt/sources.list | su -c "tee -a /etc/apt/sources.list" || echo -e "\n\n"
Password: su: Authentication failure
sed 's/deb/deb-src/g' /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list || echo -e "\n\n"
/bin/sh: 1: sudo: not found
As it need root access, So 'sudo' command not found or `root` password is unknown to me.

If I go to change without su or sudo, There is a permission denied error comes naturally as /etc/* files are belongs to root user.

The question : How to add 'deb-src' repo to '/etc/apt/sources.list' in Launchpad build environment and update with `apt-get update` ?

Here is build logs link :
[1] :
[2] :

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Solved by:
Colin Watson
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :

IMO this is a support question rather than a bug report, so moving it over there.

Revision history for this message
Best Colin Watson (cjwatson) said :

You can't do exactly what you're asking for. However, you can achieve the same goal by configuring apt to use different file locations so that you can run it as non-root, which will work here because "apt source" doesn't need root access. Off the top of my head I don't have a precise recipe for this, but perhaps you might find to be useful inspiration: all the stuff about udebs there is irrelevant to you, but it illustrates the basic approach of configuring apt appropriately.

Revision history for this message
SOURAV DAS (pipewire-debian) said :

sorry for this @Colin I discussed with the devs and dropped the package maintaing for this tool because of too much complexity and they will find some easy way to build these modules for pulseaudio, may be pulseaudio natively build these modules at their end. For now the issue is solved.

Revision history for this message
SOURAV DAS (pipewire-debian) said :

Thanks Colin Watson, that solved my question.