diff -Nru golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/changelog golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/changelog --- golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/changelog 2018-08-10 15:44:51.000000000 +0000 +++ golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/changelog 2018-11-09 09:15:18.000000000 +0000 @@ -1,3 +1,12 @@ +golang-github-go-debos-fakemachine (0.0~git20181105.9316584-1) unstable; urgency=medium + + * New upstream version 0.0~git20181105.9316584 + * debian/README.source: new file + * debian/control: set Rules-Require-Root to no + * debian/tests/control: drop obsoleted needs-recommends + + -- Héctor Orón Martínez Fri, 09 Nov 2018 10:15:18 +0100 + golang-github-go-debos-fakemachine (0.0~git20180701.cbb0abc-1) unstable; urgency=medium * New upstream version 0.0~git20180701.cbb0abc diff -Nru golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/control golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/control --- golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/control 2018-08-10 15:44:51.000000000 +0000 +++ golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/control 2018-11-09 09:15:18.000000000 +0000 @@ -13,7 +13,8 @@ # need for tests # busybox, # qemu-system -Standards-Version: 4.1.5 +Standards-Version: 4.2.1 +Rules-Requires-Root: no Homepage: https://github.com/go-debos/fakemachine Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-go-debos-fakemachine Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-go-debos-fakemachine.git diff -Nru golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/README.source golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/README.source --- golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/README.source 2018-11-09 09:15:18.000000000 +0000 @@ -0,0 +1,3 @@ +# Upstream repository + + https://github.com/go-debos/fakemachine diff -Nru golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/tests/control golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/tests/control --- golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/debian/tests/control 2018-08-10 15:44:51.000000000 +0000 +++ golang-github-go-debos-fakemachine-0.0~git20181105.9316584/debian/tests/control 2018-11-09 09:15:18.000000000 +0000 @@ -1,3 +1,3 @@ Tests: hello Depends: fakemachine, hello -Restrictions: allow-stderr needs-recommends +Restrictions: allow-stderr diff -Nru golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/machine.go golang-github-go-debos-fakemachine-0.0~git20181105.9316584/machine.go --- golang-github-go-debos-fakemachine-0.0~git20180701.cbb0abc/machine.go 2018-08-10 15:39:28.000000000 +0000 +++ golang-github-go-debos-fakemachine-0.0~git20181105.9316584/machine.go 2018-11-06 15:43:55.000000000 +0000 @@ -45,6 +45,7 @@ memory int numcpus int showBoot bool + Environ []string scratchsize int64 scratchpath string @@ -151,6 +152,8 @@ echo $? > /run/fakemachine/result ` +// The line 'Environment=%[2]s' is used for environment variables optionally +// configured using Machine.SetEnviron() const serviceTemplate = ` [Unit] Description=fakemachine runner @@ -161,7 +164,7 @@ After=basic.target systemd-resolved.service binfmt-support.service systemd-networkd.service [Service] -Environment=HOME=/root IN_FAKE_MACHINE=yes +Environment=HOME=/root IN_FAKE_MACHINE=yes %[2]s WorkingDirectory=-/scratch ExecStart=/wrapper ExecStopPost=/bin/sync @@ -303,6 +306,10 @@ w.WriteFile("/etc/fstab", strings.Join(fstab, "\n"), 0755) } +func (m *Machine) SetEnviron(environ []string) { + m.Environ = environ +} + func (m *Machine) kernelRelease() (string, error) { /* First try the kernel the current system is running, but if there are no * modules for that try the latest from /lib/modules. The former works best @@ -488,9 +495,8 @@ // the normal console messages instead, so we can see both. tty = "/dev/console" } - w.WriteFile("etc/systemd/system/fakemachine.service", - fmt.Sprintf(serviceTemplate, tty), 0644) + fmt.Sprintf(serviceTemplate, tty, strings.Join(m.Environ, " ")), 0644) w.WriteSymlink( "/lib/systemd/system/serial-getty@ttyS0.service",