Please add patches to support the 'source' stanza in interface files and to support '/etc/network/interfaces.d/'

Bug #1270881 reported by Michael Schaller
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
augeas (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Hi everyone,

Augeas hasn't received a release in a while and I would like to see two patches from upstream in Trusty:

Interfaces: add in support for the source stanza in /etc/network/intrfaces files
https://github.com/hercules-team/augeas/commit/85a45e3ff251306df9ec74db06cb94b66554ac4a

Interfaces: add /etc/network/interfaces.d/* as another commonly used location
https://github.com/hercules-team/augeas/commit/fcac272631d44149a75a52f2e6e6ce1017dcefe3

Best,

Michael Schaller

Tags: patch trusty
Revision history for this message
Michael Schaller (misch-9) wrote :
Revision history for this message
Michael Schaller (misch-9) wrote :
tags: added: trusty
Revision history for this message
Margarita Manterola (marga-9) wrote :

Just a comment to make this clearer: augeas was last released upstream as version 1.1.0 on June 2013. The patches mentioned here were applied in August 2013, so even though the Ubuntu package is up to date, these patches are missing and they are important for anybody using the "source" keyword in their /etc/network/interfaces, which is related to using /etc/network/interfaces.d.

Thanks,
Marga

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "85a45e3ff251306df9ec74db06cb94b66554ac4a.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. I've uploaded a distro-patched version to my PPA (https://launchpad.net/~racb/+archive/experimental). Please could someone test to make sure this works as expected and there are no regressions?

I think it makes sense to carry a distro patch for this functionality, but I'd like a sponsor to confirm. If anybody can comment with further justification, that would be appreciated.

I also encourage upstream to release, so that we don't have to carry a patch.

Changed in augeas (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Michael Schaller (misch-9) wrote :

Let my update my Trusty VM and give it a test run...
Will report back with the results soon.

Revision history for this message
Michael Schaller (misch-9) wrote :

Works like a charm. ^^

$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*

$ cat /etc/network/interfaces.d/loopback.conf
auto lo
iface lo inet loopback

$ cat /etc/network/interfaces.d/primary.conf
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 auto

$ dpkg -l | grep augeas
ii augeas-lenses 1.1.0-0ubuntu4~ppa1 all Set of lenses needed by libaugeas0 to parse config files
ii augeas-tools 1.1.0-0ubuntu4~ppa1 amd64 Augeas command line tools
ii libaugeas0 1.1.0-0ubuntu4~ppa1 amd64 Augeas configuration editing library and API

$ augtool ls /files/etc/network
interfaces.d/ = (none)
interfaces/ = (none)

$ augtool print /files/etc/network/interfaces
/files/etc/network/interfaces
/files/etc/network/interfaces/source = "/etc/network/interfaces.d/*"

$ augtool ls /files/etc/network/interfaces.d
loopback.conf/ = (none)
primary.conf/ = (none)

$ augtool print /files/etc/network/interfaces.d/loopback.conf
/files/etc/network/interfaces.d/loopback.conf
/files/etc/network/interfaces.d/loopback.conf/auto
/files/etc/network/interfaces.d/loopback.conf/auto/1 = "lo"
/files/etc/network/interfaces.d/loopback.conf/iface = "lo"
/files/etc/network/interfaces.d/loopback.conf/iface/family = "inet"
/files/etc/network/interfaces.d/loopback.conf/iface/method = "loopback"

$ augtool print /files/etc/network/interfaces.d/primary.conf
/files/etc/network/interfaces.d/primary.conf
/files/etc/network/interfaces.d/primary.conf/auto
/files/etc/network/interfaces.d/primary.conf/auto/1 = "eth0"
/files/etc/network/interfaces.d/primary.conf/iface[1] = "eth0"
/files/etc/network/interfaces.d/primary.conf/iface[1]/family = "inet"
/files/etc/network/interfaces.d/primary.conf/iface[1]/method = "dhcp"
/files/etc/network/interfaces.d/primary.conf/iface[2] = "eth0"
/files/etc/network/interfaces.d/primary.conf/iface[2]/family = "inet6"
/files/etc/network/interfaces.d/primary.conf/iface[2]/method = "auto"

Revision history for this message
Robie Basak (racb) wrote :

Thanks! Subscribing sponsors. Sponsors: please see comment 5 above.

Revision history for this message
Chris J Arges (arges) wrote :

Sponsored in Trusty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package augeas - 1.1.0-0ubuntu4

---------------
augeas (1.1.0-0ubuntu4) trusty; urgency=medium

  * d/p/etc-network-interfaces-{source-stanza,d}.patch: add support for source
    stanza and /etc/network/interfaces.d/ directory; cherry-picked from
    upstream (LP: #1270881).
 -- Robie Basak <email address hidden> Tue, 21 Jan 2014 09:23:41 -0600

Changed in augeas (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Michael Schaller (misch-9) wrote :

Thanks everyone for taking care of this so quickly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.