Re: ubuntu-helpers: New script "enable-proposed"
On Wed, Jul 22, 2020 at 3:39 PM Bryce Harrington wrote: > > On Wed, Jul 22, 2020 at 08:57:05AM -0500, Simon Quigley wrote: > > Hello, > > > > On 7/22/20 8:22 AM, Dan Streetman wrote: > > > Since it's related to this topic, the add-apt-repository in this ppa > > > has support for adding/enabling deb-src and arbitrary pockets as well > > > as private ppas and more: > > > https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/add-apt-repository > > If that makes it easy to enable -proposed, that would indeed be very > helpful. yeah just like $ sudo add-apt-repository -p proposed > > Googling "how to enable -proposed from CLI" returns too many results > that have people either hand edit sources.list or simply append > hand-written deb strings. If those docs can give a simple-to-run > invocation of add-apt-repository it would help eliminate user error and > confusion. > > > > I need to find some time to push the changes into the upstream repo. > > > https://code.launchpad.net/~ubuntu-support-team/software-properties/+git/software-properties/+ref/devel > > > > Merged, here you go: > > https://launchpad.net/ubuntu/+source/software-properties/0.99.0 > > > > (We're still a little bit away from Feature Freeze and we just released > > an LTS. Now is the time to test major updates to software.) > > > > On 7/21/20 8:37 PM, Bryce Harrington wrote:> I've also added an > > 'enable-proposed' script, similar to enable-debsrc, > > > which adds DIST-proposed entries (deb and deb-src) for components > > > currently enabled. IOW, if you don't have > > > universe/restricted/multiverse components enabled for anything, it won't > > > add them for -proposed, but if you do, it will. > > > > > > The script also strives to use the same archive URI you are using for > > > the main component, so if you're using a mirror it will also pull > > > -proposed from that mirror too. > > > > > > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-proposed > > > > Thanks for your work here! How much of this is now in Groovy with the > > above changes, and what can be merged into software-properties? > > Not sure, but I did notice a couple things I wished were in the API. > > First, a way to easily fuzzy search for a given entry, such as the one > for the main component. I ended up just iterating through all the > components and examining their props, but it feels a bit brittle. A > sp.sourceslist.search() or similar would have given a cleaner solution. I added a list option, e.g.: $ add-apt-repository -L deb http://archive.ubuntu.com/ubuntu focal universe restricted multiverse main deb http://archive.ubuntu.com/ubuntu focal-updates universe restricted multiverse main deb http://archive.ubuntu.com/ubuntu focal-backports universe restricted multiverse main deb http://security.ubuntu.com/ubuntu focal-security universe restricted multiverse main deb http://ppa.launchpad.net/ubuntu-support-team/add-apt-repository/ubuntu focal main it filters out deb-src lines by default but you can include them with: $ add-apt-repository -Ls deb http://archive.ubuntu.com/ubuntu focal multiverse main universe restricted deb-src http://archive.ubuntu.com/ubuntu focal multiverse main universe restricted deb http://archive.ubuntu.com/ubuntu focal-updates multiverse main universe restricted deb-src http://archive.ubuntu.com/ubuntu focal-updates multiverse main universe restricted deb http://archive.ubuntu.com/ubuntu focal-backports multiverse main universe restricted deb-src http://archive.ubuntu.com/ubuntu focal-backports multiverse main universe restricted deb-src http://archive.canonical.com/ubuntu focal partner deb http://security.ubuntu.com/ubuntu focal-security multiverse main universe restricted deb-src http://security.ubuntu.com/ubuntu focal-security multiverse main universe restricted deb http://ppa.launchpad.net/ubuntu-support-team/add-apt-repository/ubuntu focal main deb-src http://ppa.launchpad.net/ubuntu-support-team/add-apt-repository/ubuntu focal main > > Second, I'm not sure whether it's expected that users should access the > internals of entries (e.g. entry.dist, entry.file). If so, the docs > don't document them and would make them more convenient to use. If not, > then getter/setter routines or similar might be appropriate. > > > Thanks Dan and Bryce, this definitely makes things a lot easier. > > Hey and thanks for maintaining SoftwareProperties. Going into this task > I was anticipating needing to parse sources.list myself, so in examining > add-apt-repository's code was pleased to discover SoftwareProperties and > find that it did most of the work for me, and let me make very short > scripts. :-) well...personally I tried to use SoftwareProperties but found I couldn't really modify it without wide-ranging impacts. So I just disconnected add-apt-repository from it entirely. Also I think you're really just using aptsources.sourceslist and aptsources.distro, you're not using anything from SoftwareProperties AF
Re: ubuntu-helpers: New script "enable-proposed"
On Wed, Jul 22, 2020 at 08:57:05AM -0500, Simon Quigley wrote: > Hello, > > On 7/22/20 8:22 AM, Dan Streetman wrote: > > Since it's related to this topic, the add-apt-repository in this ppa > > has support for adding/enabling deb-src and arbitrary pockets as well > > as private ppas and more: > > https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/add-apt-repository If that makes it easy to enable -proposed, that would indeed be very helpful. Googling "how to enable -proposed from CLI" returns too many results that have people either hand edit sources.list or simply append hand-written deb strings. If those docs can give a simple-to-run invocation of add-apt-repository it would help eliminate user error and confusion. > > I need to find some time to push the changes into the upstream repo. > > https://code.launchpad.net/~ubuntu-support-team/software-properties/+git/software-properties/+ref/devel > > Merged, here you go: > https://launchpad.net/ubuntu/+source/software-properties/0.99.0 > > (We're still a little bit away from Feature Freeze and we just released > an LTS. Now is the time to test major updates to software.) > > On 7/21/20 8:37 PM, Bryce Harrington wrote:> I've also added an > 'enable-proposed' script, similar to enable-debsrc, > > which adds DIST-proposed entries (deb and deb-src) for components > > currently enabled. IOW, if you don't have > > universe/restricted/multiverse components enabled for anything, it won't > > add them for -proposed, but if you do, it will. > > > > The script also strives to use the same archive URI you are using for > > the main component, so if you're using a mirror it will also pull > > -proposed from that mirror too. > > > > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-proposed > > Thanks for your work here! How much of this is now in Groovy with the > above changes, and what can be merged into software-properties? Not sure, but I did notice a couple things I wished were in the API. First, a way to easily fuzzy search for a given entry, such as the one for the main component. I ended up just iterating through all the components and examining their props, but it feels a bit brittle. A sp.sourceslist.search() or similar would have given a cleaner solution. Second, I'm not sure whether it's expected that users should access the internals of entries (e.g. entry.dist, entry.file). If so, the docs don't document them and would make them more convenient to use. If not, then getter/setter routines or similar might be appropriate. > Thanks Dan and Bryce, this definitely makes things a lot easier. Hey and thanks for maintaining SoftwareProperties. Going into this task I was anticipating needing to parse sources.list myself, so in examining add-apt-repository's code was pleased to discover SoftwareProperties and find that it did most of the work for me, and let me make very short scripts. :-) Bryce -- ubuntu-server mailing list ubuntu-server@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam
Re: ubuntu-helpers: New script "enable-proposed"
Hello, On 7/22/20 8:22 AM, Dan Streetman wrote: > Since it's related to this topic, the add-apt-repository in this ppa > has support for adding/enabling deb-src and arbitrary pockets as well > as private ppas and more: > https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/add-apt-repository > > I need to find some time to push the changes into the upstream repo. > https://code.launchpad.net/~ubuntu-support-team/software-properties/+git/software-properties/+ref/devel Merged, here you go: https://launchpad.net/ubuntu/+source/software-properties/0.99.0 (We're still a little bit away from Feature Freeze and we just released an LTS. Now is the time to test major updates to software.) On 7/21/20 8:37 PM, Bryce Harrington wrote:> I've also added an 'enable-proposed' script, similar to enable-debsrc, > which adds DIST-proposed entries (deb and deb-src) for components > currently enabled. IOW, if you don't have > universe/restricted/multiverse components enabled for anything, it won't > add them for -proposed, but if you do, it will. > > The script also strives to use the same archive URI you are using for > the main component, so if you're using a mirror it will also pull > -proposed from that mirror too. > > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-proposed Thanks for your work here! How much of this is now in Groovy with the above changes, and what can be merged into software-properties? Thanks Dan and Bryce, this definitely makes things a lot easier. -- Simon Quigley tsimo...@ubuntu.com tsimonq2 on freenode and OFTC 5C7A BEA2 0F86 3045 9CC8 C8B5 E27F 2CF8 458C 2FA4 signature.asc Description: OpenPGP digital signature -- ubuntu-server mailing list ubuntu-server@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam
Re: ubuntu-helpers: New script "enable-proposed"
Since it's related to this topic, the add-apt-repository in this ppa has support for adding/enabling deb-src and arbitrary pockets as well as private ppas and more: https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/add-apt-repository I need to find some time to push the changes into the upstream repo. https://code.launchpad.net/~ubuntu-support-team/software-properties/+git/software-properties/+ref/devel On Wed, Jul 22, 2020 at 8:38 AM Bryce Harrington wrote: > > I've also added an 'enable-proposed' script, similar to enable-debsrc, > which adds DIST-proposed entries (deb and deb-src) for components > currently enabled. IOW, if you don't have > universe/restricted/multiverse components enabled for anything, it won't > add them for -proposed, but if you do, it will. > > The script also strives to use the same archive URI you are using for > the main component, so if you're using a mirror it will also pull > -proposed from that mirror too. > > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-proposed > > Bryce > > On Tue, Jul 21, 2020 at 04:20:58PM -0700, Bryce Harrington wrote: > > I've added a simple little script to enable deb-src lines in > > sources.list to ubuntu-helpers: > > > > > > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-debsrc > > > > This script modifies your /etc/apt/sources.list and > > /etc/apt/sources.list.d/* files, and for each enabled deb line, it > > uncomments the corresponding deb-src line. > > > > In case anyone else finds it useful, there it is. > > > > Bryce > > -- > ubuntu-server mailing list > ubuntu-server@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-server > More info: https://wiki.ubuntu.com/ServerTeam -- ubuntu-server mailing list ubuntu-server@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam
ubuntu-helpers: New script "enable-proposed"
I've also added an 'enable-proposed' script, similar to enable-debsrc, which adds DIST-proposed entries (deb and deb-src) for components currently enabled. IOW, if you don't have universe/restricted/multiverse components enabled for anything, it won't add them for -proposed, but if you do, it will. The script also strives to use the same archive URI you are using for the main component, so if you're using a mirror it will also pull -proposed from that mirror too. https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-proposed Bryce On Tue, Jul 21, 2020 at 04:20:58PM -0700, Bryce Harrington wrote: > I've added a simple little script to enable deb-src lines in > sources.list to ubuntu-helpers: > > > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-debsrc > > This script modifies your /etc/apt/sources.list and > /etc/apt/sources.list.d/* files, and for each enabled deb line, it > uncomments the corresponding deb-src line. > > In case anyone else finds it useful, there it is. > > Bryce -- ubuntu-server mailing list ubuntu-server@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam