support ubuntu12+14
to fix #55
What this PR did:
- mkfs.ext4 -O ^has_journal,^metadata_csum for ubuntu12, 14
- restore initctl for ubuntu12, 14
- setup ttyS0 for ubuntu12, 14
- control packages by release version
Tested On:
- [x] ubuntu 12.04
- [x] ubuntu 14.04
- [x] ubuntu 16.04
- [x] ubuntu 18.04
Testcase:
$ cat Dockerfile
FROM ubuntu:12.04
# apt sources
RUN sed -i 's/archive/old-releases/g' /etc/apt/sources.list
$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --privileged -v $(pwd):/d2vm -w /d2vm ssst0n3/d2vm:v0.2.2-dev build -f Dockerfile . -v
$ cp disk0.qcow2 vm.qcow2
$ qemu-system-x86_64 -hda vm.qcow2 --enable-kvm -nographic
...
Ubuntu 12.04.5 LTS localhost.localdomain ttyS0
localhost login:
@Adphi review please?
@Adphi ping (I've tested in some images, it works good.)
Hello @ssst0n3,
Thanks for you pull request !
I'm sorry, but I'm not sure what to make about it.
As stated in the issue (#55):
we won't be making any changes to the project to support this use case
We don't want to maintain distribution versions that are no longer maintained upstream. This will only create an increasing burden on project maintenance. The maintenance required to keep the project up to date with the supported distribution versions is more than sufficient.
Can you explain the reasons for adding support for such unmaintained distribution versions ?
@Adphi
I use the unmaintained distribution versions to build the env of history container vulnerabilities.
FYI: https://github.com/ssst0n3/docker_archive/blob/main/docker/v0.7.1/Dockerfile#L1
If you like, I can help maintain this part.
I'm ok to add non official support for it, as long as you maintain it. We need to add some tests for this. But they will be optional because it should not be a show stopper in case of breaking change. I'll try to find some time in the following weeks to review the pull request.