41 Commits

Author SHA1 Message Date
John Kristensen ceef4f27fd Fix keyring copy on Debian 13/trixie (#210)
It seems as though the `/usr/share/keyrings/debian-archive-keyring.gpg`
on Debian 13/trixie is actually a symlink to
`debian-archive-keyring.pgp` in the same directory. This means that the
`cp -a` in `mkimage` copies the symlink and not the actual keyring,
resulting in the following error:

    E: specified keyring file (/<tmpdir>/debian-archive-keyring.gpg) not found

Using `cp -aL` ensures the file that is symlink source actually gets
copied.

Signed-off-by: John Kristensen <john@jerrykan.com>
2025-12-16 12:07:23 +01:00
Javier J. Salmerón García f1fd9b459c feat: Add debian trixie support (#201)
* feat:  Add debian trixie support

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* chore: 🔧 Add perl package

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* chore: 🔧 Bump ubuntu testing version

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

---------

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>
2025-09-08 12:14:47 +02:00
Colin Walters fb66c35df1 mkimage: Remove device nodes (#173)
Closes: https://github.com/bitnami/minideb/issues/171

Signed-off-by: Colin Walters <walters@verbum.org>
2024-10-23 10:45:37 +02:00
Carlos Rodríguez Hernández a76f97db15 Deprecate Debian 10 (#165)
* Deprecate Debian 10

Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>

* Change debootstrap

Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>

* Remove buster from checks

Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>

* Update bullseye

Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>

---------

Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
2024-07-01 18:11:30 +02:00
Jose Antonio Carmona 3b6f68774e Update security repo URLs
Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
2023-06-14 13:34:45 +02:00
Carlos Rodríguez Hernández 32eaab11fd Merge branch 'master' into add-bookworm-support 2023-06-14 12:21:27 +02:00
Carlos Rodríguez Hernández b108d75105 Change security repo url
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
2023-06-13 18:39:32 +02:00
Carlos Rodríguez Hernández 6f2f618253 Remove custom keys. They were only used in two versions and not in others
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
2023-06-13 18:22:25 +02:00
Carlos Rodríguez Hernández 489416e02e Remove unstable mentions and always add security repo to sources
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
2023-06-13 18:21:41 +02:00
Jose Antonio Carmona 04c8a20386 Add support for Debian 12 bookworm
Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
2023-06-12 18:11:35 +02:00
Carlos Rodriguez Hernandez a9d9039d03 Remove snapshot logic
Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
2022-11-03 16:40:27 +00:00
John Kristensen 688305299d Support Debian 11/bullseye (#110)
The `update-rc.d` command in the `init-system-helpers` package is
required by the `linux-util` postinst script, but `init-system-helpers`
doesn't seem to be installed by default in 11/bullseye.

The suite name for the updates repository has also changed in
11/bullseye.
2021-08-31 16:15:50 +02:00
Juan Jose Medina 98de255d46 Migrate to GitHub actions (#103) 2021-03-10 16:37:37 +01:00
darteaga 815d32183d apply pr feedback 2020-07-01 16:36:28 +00:00
darteaga eee9f06e77 improve snapshot script to always get the latest id 2020-07-01 14:44:40 +00:00
darteaga 35fb3b08f5 avoid using IFS 2020-07-01 10:44:13 +00:00
darteaga e754737551 fix read options error 2020-06-30 11:59:15 +00:00
darteaga 8fafa0d899 add support for debian snapshot 2020-06-30 11:38:19 +00:00
James Westby 10a49a0a03 Don't delete symlinks in /usr/share/doc
/usr/share/doc contains a structure that might be like

```
   foo/copyright
   foo/other
   bar -> foo
```

In this case we want to delete `foo/other`, but leave `bar` alone.

The previous code would delete `bar` as it is not a directory.

However, the structure of `/usr/share/doc` is such that the first
level is a per-package directory (or symlink) and the directory
contains the files. We therefore want to only consider files in the
package directories, so look a level further down the tree before
deleting.
2020-01-21 17:15:59 +01:00
James Westby 6309b17069 Add shellcheck to catch bad shell code 2019-10-04 16:01:31 +01:00
John Kristensen 449decc476 Use deb.debian.org
The httpredir.debian.org service has been dropped in favour of
deb.debian.org

ref: https://lists.debian.org/debian-mirrors/2017/02/msg00000.html
2019-10-04 15:29:47 +01:00
James Westby b4db65f619 [mkimage] Clean hostname and resolv.conf
These depend on the build environment, but differences
don't show up inside the docker image as docker sets the
content of these files when starting a container.

We can put static values in the files to stop the image
layers differing without affecting the running containers
in any way.

This wasn't caught by the reproducibility check as the values
will be pretty static when built on the same host. (hostname
will be fixed, and resolv.conf will only change if the networking
configration changes enough, and that is unlikely to happen)
2019-10-01 15:19:48 +01:00
James Westby dc6a22375b Fix reproducible builds by fixing date in /etc/shadow
The builds were reproducible provided they were done on the same day.

However if they were done on different days they had different dates
in /etc/shadow and so changed. This meant that the images were
updated every day, and sometimes the reproducibility check would
fail if the day ticked over between the builds.
2019-09-30 12:29:49 +02:00
Filippo Giunchedi 2c4b4f0f14 Add Buster
Tweak the tests so that they use default-mysql-server
on newer dists as it replaced the mysql-server package.

Also add explicit import of the buster signing key
as the Travis agent doesn't have it available.

Thanks to Filippo Giunchedi (@filippog) for the initial
work on this.
2019-07-11 16:11:35 +02:00
James Westby 44030c910b Make the image build reproducible
Change the mkimage script so that the produced image is
reproducible. This involves:

   - removing the ldconfig aux-cache as it changes on every build.
   - set the mtimes of the files to a specific date so that the
     resulting tar file will have the same contents.
   - The `strings` guard around the unsafe-io tweak seems to be
     non-deterministic. It was sometimes not adding the tweak
     for the same file. Remove it as we don't care about older
     than jessie.
   - Importing the image by constructing a docker image with
     a specific timestamp and doing `docker load`.

Also change the buildall script to build each image twice and
confirm that the same tarball is produced, and that results
in the layers in the imported images matching.

Add a dockerdiff script that checks that two images are equivalent,
and tries to show the differences if not. This is useful when the
build script reports differences, as it can point to what the
differences are.
2017-02-10 11:48:28 +00:00
James Westby daeaab7326 Fix the loop to be POSIX-compatible. (#10)
We were using a bashism in install_packages, but it was
a `/bin/sh` script. This meant there was a syntax error, but
it didn't kill the script so it would loop forever.

Add a test for the install_packages loop by installing something
that doesn't exist. This will trigger the loop, and should hit
the maximum loop count and error out. If it doesn't then the timeout
command will kill it and the test will fail. Using a timeout
isn't ideal, but better than looping forever.

Also clean up the test script a little bit and print a description
of each test before running it.
2016-12-07 09:42:50 +00:00
James Westby 590b58eb70 Fix the typo in install_packages. (#9) 2016-12-01 17:21:14 +00:00
James Westby a09917a0ce Retry apt if it fails in install_packages. (#8)
Sometimes apt will fail due a transient network issue. Often that
will be fixed by retrying.

This is particularly useful as part of an automated build pipeline.
2016-11-30 15:11:33 +00:00
Adnan Abdulhussein dbc4db9441 install_packages: use --no-install-recommends flag by default (#7) 2016-11-25 10:24:19 +00:00
James Westby 47e1cb91ef Add some more commonly expected packages.
sysv-rc and util-linux are used in the postinst scripts
of some packages, and so those packages won't install
if they aren't available.

sysv-rc contains update-rc.d, so any package that installs
a service would fail to install. Those packages are common
to install in to containers.

util-linux contains the getopt command which some scripts
expect to find.
2016-10-19 12:22:47 +01:00
James Westby 875e3592f7 Don't delete copyright files.
Some licences require that the binaries be shipped with a copy
of the license. Debian does this in the copyright files in
/usr/share/doc. We need to leave those files there to keep
the image distributable.
2016-10-14 17:00:53 +01:00
James Westby 82ca442105 Don't use --force-yes. 2016-09-08 12:38:14 +01:00
James Westby 13da6c814e Set the correct dist in the sources.list file. 2016-09-08 12:24:29 +01:00
James Westby 370747c60f Set the sources.list and update from security. 2016-09-08 12:13:51 +01:00
James Westby 2e2ab24571 Run the second stage with bash. 2016-09-08 11:00:08 +01:00
James Westby e3cff8ae42 Improve the install_packages script. 2016-09-08 10:27:21 +01:00
James Westby af15d6de65 Build with set -x to get debug output. 2016-09-08 10:24:41 +01:00
James Westby f5120b8874 Remove --force-check-gpg as it is not supported on trusty. 2016-09-08 10:16:25 +01:00
James Westby 549a2eb616 Use custom debootstrap scripts.
These allow for us to further customize the packages installed.
2016-09-02 17:32:07 +01:00
James Westby a21737a453 Record a manifest of the packages installed.
Also log the image creation to a file.
2016-09-02 17:31:14 +01:00
James Westby 2916ff94f4 First go at minideb. 2016-09-02 14:48:09 +01:00