Commit Graph

1248 Commits

Author SHA1 Message Date
Andrius Štikonas 45924ae12a Remove factor binary (issue #176)
Only coreutils 5 is affected. We don't build factor in coreutils 6
and coreutils 8.32 does not use pregenerated headers in its implementation
of factor.
2022-06-06 21:42:24 +02:00
Andrius Štikonas 4923a79a70 Actually apply patch removing date from generated manpages.
Fixes #180
2022-06-06 00:19:45 +02:00
Andrius Štikonas 28986a4a74 Fix remaining repo_path merge issues. 2022-06-05 20:59:35 +01:00
Andrius Štikonas 79c532cd2c Update hash of automake-1.11.2
Turns out we still hardcode current date in the manpage.
This needs fixing but in the meantime update the hash.
2022-06-05 19:57:27 +01:00
fosslinux 0b645dfc7e
Merge pull request #179 from stikonas/mes_ppsyntax
Remove pregenerated files (ppsyntax) in mes.
2022-06-04 08:25:38 +10:00
Andrius Štikonas 625c844779 Fix pylint. 2022-06-03 21:43:49 +01:00
Andrius Štikonas ae811bde5d Remove pregenerated files (ppsyntax) in mes.
They appear to be unused.

Fixes #164
2022-06-03 21:05:24 +01:00
Andrius Štikonas 407b02d6b4 Update stage0-posix to latest snapshot. 2022-06-02 22:44:02 +01:00
Andrius Štikonas 86bb6b1d6f Update instructions for Pythonless bootstrap. 2022-06-02 21:04:25 +01:00
Andrius Štikonas 1a4e83e2fb Fix another mismerge that broke rootless bootstrap. 2022-06-02 20:51:15 +01:00
Andrius Štikonas b0f0fa3a95 Fix return from bin_preseed. 2022-06-02 20:25:23 +01:00
fosslinux 3c6e8b1b99
Merge pull request #174 from stikonas/preseed
Allow preseeding with binary packages.
2022-05-30 21:42:18 +10:00
Andrius Štikonas d84bb236a4 Add an argument to rootfs.py to preseed bootstrap with binary packages. 2022-05-29 00:04:57 +01:00
Andrius Štikonas 0b3782d61b Allow preseeding with binary packages. 2022-05-29 00:04:57 +01:00
Andrius Štikonas 9bc2ca1726
Merge pull request #175 from doraskayo/bwrap-bootstrap
Add a rootless bootstrap mode using bubblewrap
2022-05-27 14:09:49 +01:00
Dor Askayo 1e67477ff2 Add a rootless bootstrap mode using bubblewrap
Set up a bubblewrap sandbox suitable for bootstrap. Since bubblewrap
can operate without root permissions when user namespaces are
allowed, this effectively adds a rootless bootstrap mode.
2022-05-27 11:46:14 +03:00
Dor Askayo 8330ab4504 Add an option to avoid creating a tmpfs in prepare()
Root access is required for creating tmpfs mounts in the context of
the current mount namespace, and creating a tmpfs in the context of a
new mount namespace is less useful because a process in the parent
namespace can't easily access it.

So add an option to avoid creating tmpfs mounts, which will be used by
the rootless bootstrap mode for now.

In addition, when tmp directories aren't mounted as tmpfs, their
contents can't be removed using os.umount(). So instead remove them
recursively using shutil.rmtree().
2022-05-27 11:45:09 +03:00
Dor Askayo 6d357226a9 Call prepare() externally to the sysa and sysc classes
This keeps the prepartion and bootstrap initiation logic in the same
place for each bootstrap mode, and allows each mode to specify its
own requirements and expectations from the different bootstrap steps.
2022-05-23 17:45:53 +03:00
Dor Askayo a7c7ddf977 Split "chroot" into "copy_sysc" and "create_initramfs" in sysa's prepare()
These better describe the actions, and will make more sense with the
addition of the rootless bootstrap mode which would make use of these
preparation steps.
2022-05-23 17:45:53 +03:00
Dor Askayo 7075c901a9 Move sysa's initramfs creation into prepare() 2022-05-23 17:45:53 +03:00
Dor Askayo fa2a09b63f Rename "chroot" to "create_disk_image" in sysc's prepare()
This better describes the action, and will make more sense with the
addition of the rootless bootstrap mode that doesn't require a disk
image either.
2022-05-23 17:45:53 +03:00
Dor Askayo c429cf9dd7 Keep chroot indication only in prepare()
It's not actually needed by other methods.
2022-05-23 17:45:53 +03:00
Dor Askayo 7040b550a9 Make rootfs_dir local to prepare()
It's not needed by other methods.
2022-05-23 17:45:53 +03:00
Dor Askayo 537cdb6540 Detach loopback device only if it was attached
Also change the print to better describe the action taken.
2022-05-23 17:45:53 +03:00
Dor Askayo 8c605f213a Ensure umount isn't called when self.mounted_tmpfs=False
This is accomplished by calling SysGeneral's __del__() method,
in which self.mounted_tmpfs is already checked.
2022-05-23 17:45:53 +03:00
Andrius Štikonas b2814c9a97
Merge pull request #170 from stikonas/checksums
Checksum source tarballs during bootstrap.
2022-05-21 23:50:58 +01:00
Andrius Štikonas 9d15314ebc Checksum source tarballs during bootstrap. 2022-05-21 23:49:37 +01:00
Andrius Štikonas ca4f141be0
Merge pull request #173 from doraskayo/run2-kaem-permissions
Fix file permissions for run2.kaem
2022-05-21 22:57:52 +01:00
Dor Askayo cf1964b3bf Fix file permissions for run2.kaem 2022-05-22 00:23:53 +03:00
Andrius Štikonas 7a7c239fe4
Merge pull request #172 from doraskayo/update-mes
Update mes to the latest git snapshot
2022-05-21 20:20:51 +01:00
Dor Askayo 7adff2dcd3 Update mes to the latest git snapshot
This should include a fix for S_ISUID that we "lost" when switching
away from mes-m2's libc.

See http://git.savannah.gnu.org/cgit/mes.git/commit/?id=ce54ccc2c04b0a6ec9105522e4b8b4cc278c5106
2022-05-21 21:48:23 +03:00
Andrius Štikonas f320539dd2 Update DEVEL.md 2022-05-21 19:29:55 +01:00
Andrius Štikonas 0d1a1a5a19
Merge pull request #171 from doraskayo/early-update-checksums
Add support for --update-checksums in early bootstrap
2022-05-21 19:23:47 +01:00
Dor Askayo 653f31b59f Add support for --update-checksums in early bootstrap
This allows creating *.checksums files instead of checking against
them when UPDATE_CHECKSUMS is set to True in bootstrap.cfg.

The checksums are also copied to /usr/src so they can be accessed
easily after the bootstrap completes.
2022-05-21 20:51:41 +03:00
Andrius Štikonas c6ca548d5b Add after.sh hook to sysc (similarly to after.kaem hook in stage0-posix). 2022-05-21 00:50:37 +01:00
Dor Askayo 18fa642100 Rename checksums to ${pkg}.checksums 2022-05-21 02:34:23 +03:00
Dor Askayo d12d0e0f9c Make bootstrap.cfg available during early bootstrap 2022-05-20 19:49:19 +03:00
Dor Askayo d1fea647ee Use ${bindir} in after.kaem 2022-05-20 19:33:36 +03:00
fosslinux fc0368aa6a
Merge pull request #169 from stikonas/links
Merge symlinks into tarball packages.
2022-05-20 22:46:30 +10:00
fosslinux b199aa3396
Merge pull request #163 from doraskayo/rootless-prep-2
Additional preparations for rootless bootstrap
2022-05-20 22:45:37 +10:00
Andrius Štikonas 8f61b8400e Merge symlinks into tarball packages. 2022-05-20 09:39:57 +01:00
Andrius Štikonas 081912058f
Merge pull request #161 from doraskayo/local-bootstrap-config
Don't export variables from bootstrap.cfg
2022-05-19 20:45:35 +01:00
Dor Askayo 0a98a6e13d Use "rm -f" in libtool to avoid an interactive prompt 2022-05-19 21:55:25 +03:00
Dor Askayo 507f945419 Remove /dev/null only if it's not a character device 2022-05-19 21:55:25 +03:00
Dor Askayo 8054f60a3c Use existing mounts in sysc when available
This would be the case when bubblewrap is used for sandboxing the
bootstrap.
2022-05-19 21:54:56 +03:00
fosslinux 940d4003f2
Merge pull request #168 from stikonas/packaging
Fix packaging issues
2022-05-18 15:56:03 +10:00
Andrius Štikonas 21f4174dc3 Fix packaging issues
* Bzip2 was manually installed directly into filesystem, so bzip2 package was empty.
  Fixed by installing it to destdir. bzip2 moves out its binary before installing
  its own package.
* sha256sum from stage0-posix was not checking any checksums because it does not
  accept piped input. Fixed by using temporary file.
* grep was broken for a short time (but with fixed bzip2 package this caused failures)
  due to touch creating grep file of zero size (egrep symlink was touched).
  Fixed by implementing touch -h

Resolves #156, resolves #166, resolves #167
2022-05-17 10:19:50 +01:00
Andrius Štikonas 3e4f823ffb
Merge pull request #165 from doraskayo/reproducible-packages
Improve reproduciblity of tarball and XBPS packages
2022-05-15 19:26:35 +01:00
Dor Askayo fcea28eb38 Don't export variables from bootstrap.cfg
These variables should only affect live-bootstrap's scripts, yet they
currently "pollute" the build environment of most packages during the
bootstrap unnecessarily.

This change also makes bootstrap.cfg keep the same format between the
different bootstrap stages, which simplifies the input to each step.
2022-05-15 18:15:30 +03:00
Dor Askayo fde1bbc571 Update bootstrap.cfg immediately after interactive prompts
This improves the readablility of the scripts. It also helps avoid
cases where a variable could be set twice in bootstrap.cfg, such as
the DISK variable.
2022-05-15 18:15:30 +03:00