-
Notifications
You must be signed in to change notification settings - Fork 331
Comparing changes
Open a pull request
base repository: coreos/go-systemd
base: v22.0.0
head repository: coreos/go-systemd
compare: v22.1.0
- 12 commits
- 7 files changed
- 6 contributors
Commits on Jan 6, 2020
-
Added methods to get active session and to retrieve user and display …
…from a specific session
Configuration menu - View commit details
-
Copy full SHA for d53122b - Browse repository at this point
Copy the full SHA d53122bView commit details
Commits on Jan 8, 2020
-
Fixes on GetActiveSession, GetSessionUser and GetSessionDisplay to av…
…oid errors and panic
Configuration menu - View commit details
-
Copy full SHA for ac22ec9 - Browse repository at this point
Copy the full SHA ac22ec9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b534a3 - Browse repository at this point
Copy the full SHA 2b534a3View commit details
Commits on Jan 9, 2020
-
Merge pull request #329 from brunogui0812/master
login1: support getting active session and session details
Luca Bruno authoredJan 9, 2020 Configuration menu - View commit details
-
Copy full SHA for d657f96 - Browse repository at this point
Copy the full SHA d657f96View commit details
Commits on Mar 10, 2020
-
deserialize: Use quote to print possibly-invalid string
An openshift/machine-config-operator user wrote an invalid unit, and printing the contents as a byte array is unnecessary; it's almost certain to be a valid string, we just found a syntax error.
Configuration menu - View commit details
-
Copy full SHA for 6e15d2f - Browse repository at this point
Copy the full SHA 6e15d2fView commit details
Commits on Mar 12, 2020
-
Merge pull request #332 from cgwalters/quote-deserialize
deserialize: Use quote to print possibly-invalid string
Luca Bruno authoredMar 12, 2020 Configuration menu - View commit details
-
Copy full SHA for 0d26d2e - Browse repository at this point
Copy the full SHA 0d26d2eView commit details
Commits on Mar 13, 2020
-
unit: deserialize keeps all semantic data
The existing unit.Deserialize() function does not contain all the semantic data in a unit file. Specifically it does not fully support multiple sections. It does correctly parse the sections, but the `[]*UnitOption` data structure does not tell the caller, in the case of a unit file with duplicate section names, *which* section the UnitOptions are from. This may matter. For example, a `/etc/systemd/network/*.network` file can have multiple `[Route]` entries. Just returning an array of `Section, Name, Value` tuples does not tell the caller which `[Route]` a given `Name, Value` pair belongs to. Ex: ``` [Route] Gateway=10.0.100.1 Destination=10.0.0.1/24 [Route] Gateway=10.0.100.2 Destination=10.0.2.1/24 ``` This unit file will generate the following from `unit.Deserialize()` ``` {Section: "Route", Name: "Gateway", Value: "10.0.100.1"} {Section: "Route", Name: "Destination", Value: "10.0.0.1/24"} {Section: "Route", Name: "Gateway", Value: "10.0.100.2"} {Section: "Route", Name: "Destination", Value: "10.0.2.1/24"} ``` With just this information, it is not possbile to know which `Gateway` goes to which `Destination`. Order maybe, but what if there were not two Gateways? Which `Destination` would go with the `Gateway`? This patch introduces a new Deserialize function that returns the following data structures: ``` // UnitEntry is a single line entry in a Unit file. type UnitEntry struct { Name string Value string } // UnitSection is a section in a Unit file. The section name // and a list of entries in that section. type UnitSection struct { Section string Entries []*UnitEntry } ``` The new DeserializeSection() signature is: ``` func DeserializeSections(f io.Reader) ([]*UnitSection, error) ``` And the output from it given the example unit file above is: ``` {Section: Route{Name: Gateway, Value: 10.0.100.1}{Name: Destination, Value: 10.0.0.1/24}} {Section: Route{Name: Gateway, Value: 10.0.100.2}{Name: Destination, Value: 10.0.2.1/24}} ``` The `Name`, `Value` pairs are directly associated with a specific section. There is no ambiguity. There are unit tests added to `unit/deserialize_test.go` that do basic tests on `DeserializeSections()`. All exising unit tests in that file are untouched and pass. add license header unit: serialize sections added In addition to deserializing into UnitSections, also support serializing into them. Tests added for this, both the appliciable serializing tests from UnitOptions, but also a specific test for UnitSections (the point of this patch). unit: fix serialize section test. I was testing the test by giving it bad data. It passed the failure. Now set the data back to the correct expected data. unit: code review updates, rework lex channel code Addressed code review comments. * Do not assume len of sections will always be > 0 * Removed unneeded check for empty data. * Reworked the channels. Changed two dependent channels into a single channel. This simplifed the channel read handling very much and removed the read dependency between the channels. All tests are passing. Updates to PR 330 unit: code review comments - tweaks * Made `DeserializeAll()` into a private function as there's no use case for it to be public. * Added `DeserializeOptions` to mirror the `DeserializeSections`. * Marked `Deserialize` as depreciated. * Return actual `error` on unit file misparse. unit: fix typo in comment.Configuration menu - View commit details
-
Copy full SHA for 5e1c393 - Browse repository at this point
Copy the full SHA 5e1c393View commit details
Commits on Mar 16, 2020
-
Merge pull request #330 from mergetb/unit-section-fix
unit: deserialize keeps all semantic data
Luca Bruno authoredMar 16, 2020 Configuration menu - View commit details
-
Copy full SHA for cb8b647 - Browse repository at this point
Copy the full SHA cb8b647View commit details -
unit: do not export private constants
This renames and un-exports two private constants that are public by mistake (but never part of a release).
Luca BRUNO committedMar 16, 2020 Configuration menu - View commit details
-
Copy full SHA for f4046b1 - Browse repository at this point
Copy the full SHA f4046b1View commit details
Commits on May 29, 2020
-
Merge pull request #333 from lucab/ups/unit-unexport
unit: do not export private constants
Configuration menu - View commit details
-
Copy full SHA for b046ffc - Browse repository at this point
Copy the full SHA b046ffcView commit details
Commits on Jun 2, 2020
-
docs: update docs links in README
This updates documentation links in README, in order to use the new module setup and abandon the now deprecated `godoc.org`.
Luca BRUNO committedJun 2, 2020 Configuration menu - View commit details
-
Copy full SHA for f59d7ed - Browse repository at this point
Copy the full SHA f59d7edView commit details -
Merge pull request #335 from lucab/ups/readme-godoc
docs: update docs links in README
Luca Bruno authoredJun 2, 2020 Configuration menu - View commit details
-
Copy full SHA for b51e752 - Browse repository at this point
Copy the full SHA b51e752View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v22.0.0...v22.1.0