Compare commits

...

7 Commits

Author SHA1 Message Date
fosslinux c168a3bd4c
Merge pull request #115 from melg8/master
Add coreutils 8.32 and fix creation dates
2021-05-24 07:34:23 +10:00
fosslinux ce73c01923
Merge pull request #118 from stikonas/coreutils-6
Remove some unused pregen-files in coreutils 6.
2021-05-24 07:29:52 +10:00
Melg Eight cf4ce56603
Add config file and force timestamp conditional option 2021-05-20 02:04:39 +03:00
Melg Eight fefb33a870
Add coreutils 8.32 2021-05-20 02:04:39 +03:00
Andrius Štikonas 875d13fb0d Remove some unused pregen-files in coreutils 6. 2021-05-17 23:27:56 +01:00
fosslinux 74f7ec4cd3
Merge pull request #116 from stikonas/tar_ownership
Unpack tarballs with --no-same-owner.
2021-05-16 12:06:11 +10:00
Andrius Štikonas cd3fb17aa6 Unpack tarballs with --no-same-owner. 2021-05-08 13:53:42 +01:00
15 changed files with 668 additions and 18 deletions

View File

@ -26,6 +26,7 @@ e20bdd49a0fb317959b410c1fe81269a620ec21207045d8a37cadea621be4b59 binutils-2.14.
ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.tar.gz
c25b36b8af6e0ad2a875daf4d6196bd0df28a62be7dd252e5f99a4d5d7288d95 coreutils-5.0.tar.bz2
1d013547889f20576460249c4210632d5314531c8477378a2e046b13a8ebeb7e coreutils-6.10.tar.gz
6f7cfc0ac6717afb6ba1f41b0da43a713ba0dd97dec1227e32effc12d79f08c1 coreutils-8.32.tar.gz
d5f2489c4056a31528e3ada4adacc23d498532b0af1a980f2f76158162b139d6 diffutils-2.7.tar.gz
813cd9405aceec5cfecbe96400d01e90ddad7b512d3034487176ce5258ab0f78 findutils-4.2.33.tar.gz
bc79b890f35ca38d66ff89a6e3758226131e51ccbd10ef78d5ff150b7bd73689 flex-2.5.11.tar.gz
@ -35,6 +36,7 @@ e9bf58c761a4f988311aef6b41f12fd5c7e51d09477468fb73826aecc1be32e7 gcc-4.0.4.tar.
fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 gmp-6.2.1.tar.xz
df807e694deea2dcba0c43af318394f3e3fcd52658c3b71b61dad0ce0c0cfb77 gnulib-30820c.tar.gz
0cfbf866bc39c31f25fa0e56af1e56c5e5c92fc1e5d51242ebafef7ea211f3d5 gnulib-8e128e.tar.gz
12cfa21abf618a274017d6b18e95fc6582519d7c08e2403e5c5772ccdd5b85f4 gnulib-d279bc.tar.gz
a32032bab36208509466654df12f507600dfe0313feebbcd218c32a70bf72a16 grep-2.4.tar.gz
4d2ce9f314f39c9575f913503b0178d6fb2c92920db8e7b7b176b7bab7980fe6 gzip-1.2.4.tar
9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba heirloom-devtools-070527.tar.bz2

View File

@ -2,6 +2,7 @@
.. SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
.. SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
.. SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
.. SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
.. SPDX-License-Identifier: CC-BY-SA-4.0
@ -590,6 +591,13 @@ automake 1.15.1
GNU Automake from 1.15 series. This is the last version that runs on Perl 5.6.
coreutils 8.32
=============
We build the latest available coreutils 8.32 which adds needed options to make
results of build metadata reproducible. For example, timestamps are changed with
``touch --no-dereference``.
tar 1.34
========

View File

@ -9,6 +9,7 @@ you can run bootstap inside chroot.
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Bastian Bittorf <bb@npl.de>
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
import argparse
import glob
@ -33,6 +34,9 @@ def main():
parser.add_argument("-p", "--preserve", help="Do not unmount temporary dir",
action="store_true")
parser.add_argument("-t", "--tmpdir", help="Temporary directory")
parser.add_argument("--force_timestamps",
help="Force all files timestamps to be 0 unix time",
action="store_true")
# QEMU arguments
parser.add_argument("-q", "--qemu-cmd", help="QEMU command",
@ -52,7 +56,8 @@ def main():
if args.arch != "x86":
raise ValueError("Only x86 is supported at the moment.")
system_a = SysA(arch=args.arch, preserve_tmp=args.preserve, tmpdir=args.tmpdir)
system_a = SysA(arch=args.arch, preserve_tmp=args.preserve, tmpdir=args.tmpdir,
force_timestamps=args.force_timestamps)
initramfs_path = os.path.join(system_a.tmp_dir, "initramfs")
if not args.chroot:

18
sysa.py
View File

@ -2,6 +2,7 @@
"""System A"""
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
import hashlib
import os
@ -17,7 +18,7 @@ class SysA:
"""
Class responsible for preparing sources for System A.
"""
def __init__(self, arch, preserve_tmp, tmpdir):
def __init__(self, arch, preserve_tmp, tmpdir, force_timestamps):
self.git_dir = os.path.dirname(os.path.join(__file__))
self.arch = arch
self.preserve_tmp = preserve_tmp
@ -28,6 +29,7 @@ class SysA:
self.tmp_dir = tmpdir
self.sysa_dir = os.path.join(self.git_dir, 'sysa')
self.after_dir = os.path.join(self.tmp_dir, 'after')
self.force_timestamps = force_timestamps
self.prepare()
@ -186,6 +188,7 @@ class SysA:
"""
self.create_after_dirs()
self.create_configuration_file()
self.mescc_tools_checksum()
self.deploy_extra_files()
self.mescc_tools_extra()
@ -193,6 +196,15 @@ class SysA:
self.tcc_0_9_26()
self.get_packages()
def create_configuration_file(self):
"""
Creates bootstrap.cfg file which would contain options used to
customize bootstrap.
"""
config_path = os.path.join(self.after_dir, "bootstrap.cfg")
with open(config_path, "w") as config:
config.write("FORCE_TIMESTAMPS=" + str(self.force_timestamps))
def create_after_dirs(self):
"""
Create some empty directories for early bootstrap
@ -426,6 +438,10 @@ class SysA:
# automake 1.15.1
self.get_file("https://mirrors.kernel.org/gnu/automake/automake-1.15.1.tar.xz")
# coreutils 8.32
self.get_file(["https://git.savannah.gnu.org/cgit/coreutils.git/snapshot/coreutils-8.32.tar.gz",
"https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-d279bc.tar.gz"])
# tar 1.34
self.get_file(["https://mirrors.kernel.org/gnu/tar/tar-1.34.tar.xz",
"https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-30820c.tar.gz"])

View File

@ -6,6 +6,9 @@ src_prepare() {
default
mv lib/fnmatch.in.h lib/fnmatch.h
# gperf pregenerated files
rm lib/iconv_open-hpux.h lib/iconv_open-aix.h lib/iconv_open-irix.h lib/iconv_open-osf.h
# Rebuild bison pre-generated file
rm lib/getdate.c
cd lib

View File

@ -0,0 +1,107 @@
2bb19b976a488abc8d5ef6f6655a751f0a7f5ddf01cf754af4f1947a4504f28c /after/bin/[
2f4eb51bfe39e55c66d491eabc92ccd40c1ff7d90835f03df413dbfb9752c054 /after/bin/b2sum
e73a17ac386792957a6990bc25053c8b94b45de35e9c5f235534d58ed0a8a935 /after/bin/base32
d825747640d86c939ceefd300005cf0a6ddcfb66ef979d7f01cf5c0c4468ba01 /after/bin/base64
ab0ad4b23fcba5c9fad64ca660a500ba08d857267bc93a86c5d5abf664cc385a /after/bin/basename
2c8363bcd9c49f71b2109e75582646310ae4285fde381153125c68aecf41f3e5 /after/bin/basenc
c61e50357601ba6d622bd5e1cea423010d25a4ec64da76791b3db50351b3b112 /after/bin/cat
04ff3c7eb1ac9033b95ee5b0b5c8234167b0cfe71317e7adfa2f849598fc6ed1 /after/bin/chcon
e8ea30a3a3d2558a130987fa2d44227acb1047da07aede69741f6413b33ab9df /after/bin/chgrp
bef6488884ac77c153662452a2bf71d29be3a53ea7798dd7943f6636bce21f56 /after/bin/chmod
4e83f79572f01b6712c0cc7dc21154b0338d6dc4f92a379fd2e5a67898f1c6bc /after/bin/chown
49363b2acf3e85a15649c4a9f12700d92eb7e9c1566732d669c691a93697d94a /after/bin/chroot
99b2aca6a31487d68eaf0f8f2ec9e9e36b5d2a61479dae4d63f7997cf81dbf42 /after/bin/cksum
2668ec14d2f2dc6370f497213a9852759efc517f14fbdbff17c04d28db895bb8 /after/bin/comm
017c629fdfd08fb5af1b292d210bc604207ccafc1a18dbff21a0abf3cee63770 /after/bin/cp
04b0791914942a0c4c167365b9edb40584ad3631a07cd7dd0be1990ef5a028a0 /after/bin/csplit
83b204a10a5c8e36b215909ba08284771f9778a210af41c481b3c89633d16496 /after/bin/cut
b76650df2d3b059006a63a2ee23c28591cd313d1ac2d6587f906a9ade41bed8e /after/bin/date
82be6ccfebc72b2361f3e0de823c0052a3d8071431ddb6e941c460098921789c /after/bin/dd
62b26c448e248869d5f7577aace26787dfb35efbec1c88bc3d98c3603d9d102c /after/bin/df
124dc892158d257eed2fb35b9499135e9740bb265ccb66edcbf905544c808f4d /after/bin/dir
3c75d475b7b5ab532a165f058d9693198b28ed797b844fa9e8e531a3a293e886 /after/bin/dircolors
e033a42a84cd51a39be62eef25dac820fc88b6e56fff3d486461c95ea750ec98 /after/bin/dirname
b7c5e2e068d35c4f0810b1326a2687c1f479947df6da54b53c61ef66e295f9a2 /after/bin/du
1b0d32561261db41ec7b5ceef6824714e063a70ba7050468e18917a610f1f0cf /after/bin/echo
d2265786f1624ea6770b144977f0f4fb529191ceb8ad8c5af0735c28c826ab04 /after/bin/env
4bd3bdd9c4d5a600593780f092f89e7d784b35ac6527caab5819997ef4938fff /after/bin/expand
bdb8da72d4d64c82681cf3e8a9f4da88dbd42c454da5f7ca8a19445113c01f33 /after/bin/expr
7e4f3fabf9de05aaa34aa2e9baabb52fb2f3e87acfa6f202c1639e381fb7ece0 /after/bin/factor
ce84ef03bd5c5b9fef8223cd7f5b53cff7c939f9f5581859442f43b1f24ffd42 /after/bin/false
23bc80a7c3b42c72bdd3d8a0a11764d84558238b93b7cde30673a55081fd27a7 /after/bin/fmt
5ecc029ba10ce5a57d98b49cc77c21fb915eb37beba93738a1fc3d14ebad31b3 /after/bin/fold
22aadd09f819a4f993d33b92642331ea8f0ae4f829b65b673dc00ea75d959846 /after/bin/groups
b6df9e24dd89206ea15f5b3e8cd840c3b44c7f4563ecca620d3d0deec2fbcf5b /after/bin/head
4139d323fd7a01fc6f1b662443a7c0af0b677b3c2fe295743d8fbcff4ed82048 /after/bin/hostid
a6f82e0a6ac850361c799296290ca35578260a89fc6e3b5a56ad4238dfc8bb37 /after/bin/id
d8b7fb9a3e83a41f94f1acc041c4e0430279f7797d817705eeb86634e5e4c584 /after/bin/install
b336bdfa943f530053908bf86239c3a4b0a804a4c39763886a4248e675b7123c /after/bin/join
1b7fd9b369aa36815256199b6afceb30c0fb0751a8a19fa633adba6d29654b42 /after/bin/kill
3421bdec4318066e0e36df02408ec4d9066e84a6ee01f899836611b889a059ef /after/bin/link
6e4960e08193f5f2bed00c55d26c3163067929469cbefdb0599c499688c8fa04 /after/bin/ln
6c68245b55e060067de17ba920ff87c8303913decea2d81588d4efd74530b05c /after/bin/logname
075235c1f345f45434ffec06ddddd0d6ad2a4dad65efb3231591a50248209785 /after/bin/ls
769219e8f4cffd8387d1a53900b3c65c902bb9f3e2857178847894415b950f12 /after/bin/md5sum
2fdbd337da4ff238fba88085efa4c946b3c23510a995cb1c218a032e86f20526 /after/bin/mkdir
0bb537f30fab5289408530cd1878d1d9f1592a119b3bd7c823406e32fcc2f993 /after/bin/mkfifo
1f18fe91c9aad164d2d0d5f1aa319cf5e27562f80577ebbe5e41dc77cb20634c /after/bin/mknod
7480a54cf51676e406cc48255a9c25ba934a021bf61b4e3bba04d0d45e2b04c8 /after/bin/mktemp
7de04a3d8346a4f8e766152d6d4e32841894005c330a5bf67b60e15bafa5717e /after/bin/mv
f3ee0b68fb0e546c887dc8e9003cf9ca570e54207c62ac4154e42f0e0182a060 /after/bin/nice
3a7bab449fa311bea65050823deeef2a5c8dd945861d14a736aca7ac20555623 /after/bin/nl
0c196bc4ed5680e1ea63faac72f6792cebb1ef68b7332e14f79a77bae7236203 /after/bin/nohup
f463be3b2d953544793fd89506a2e3ab1dc9c7fb05b2253c98ab5791a62424f5 /after/bin/nproc
0d587099627d3067d2e871e2517b5f20577c4b4e8dc311f3cc4441e323efc268 /after/bin/numfmt
f086ead993a0bb0a1db8aa03e04781be8cc8b84cfbd6002e794e529591704df6 /after/bin/od
53b0d361ec7fb64d11f5ecc1c5dece768811f2cba60c4528f2bb9437fd3020cc /after/bin/paste
4aa833e4a93f70511918eb3535c4c76dba2d9f96f87487d655910b940ead581a /after/bin/pathchk
66011e626078cc15eff7f117d3457d327b04e2696051a0e7665a0b6c899e8468 /after/bin/pinky
a053f1a2e3ad977c29611783ed5e9cc9b495766d66a26dc6810bc9d155936c6c /after/bin/pr
bccdd16a690a14d1cf868c14122c3bc26cc3d214957fa1c2bcb562c406263b7a /after/bin/printenv
0ea5e299b966350a8beb7396614b57720b7e4e891d9b0d1875d9033d374be721 /after/bin/printf
89580495bc95821f07d11008f70acf9d70eec3a2db48d0374eb5c54feb2ecb38 /after/bin/ptx
eec466a54cc8e5a13f26128258fdf4f17333e48b2c759fb7412df62cfb47e674 /after/bin/pwd
2f70cbe9688f62846222778a234ac3a612e34edbb414b391585c1b44efee707d /after/bin/readlink
2839db35b5390c224cef97bfdb86120d4aa78f6fb6d513bb80f13172c8083075 /after/bin/realpath
c662c03027990fcb8ed59f5144b3fb9a46a66ef115a6d7d9a6053a1e24fbdb71 /after/bin/rm
9d34798c14694c0c3caa61fd9c22275b4c3febc7d048fb2c9cf1ae9189dff176 /after/bin/rmdir
16562920d60f4d71388c1f9ce894d852ff53e9e9d84e879a65285b1ea6f4e402 /after/bin/runcon
a5294ed68982a99c2630c061a64d6d3eafcffb06c8474e8d3154805b0575f5c5 /after/bin/seq
888b71e21d66d7220f63e37d4fd06d228de1b026776bbaa84a901d62ad74abd8 /after/bin/sha1sum
419ddc6994ebe2bc49ee5d2a8c3a7efed5fd64ead1390b885b703a1488bb2274 /after/bin/sha224sum
a84405002a76830aa0f5483d07f272c713dd3b9526950df2dc4369f81a599ec8 /after/bin/sha256sum
45270aa4548bf2ae8c58a03e71eac51944474f7b279b7d10faed2ece34ee80ea /after/bin/sha384sum
a094aa18b9825c5d8bf374c249ee28b16d43fb7655cb3dd5bbe289cd27b6dede /after/bin/sha512sum
27fcc8333a3dddc1f61e309c926871798728f638f2aab1a534da392cf2708cdb /after/bin/shred
db0f9e5853d099ab30b80620609b358d74735636943a25f6a3fd0381b510c308 /after/bin/shuf
7006051038bf81f4eff6475b2dc341e0badd6d7c60fe34e5c2cf51a5eacaa0c5 /after/bin/sleep
30eed72bc4f1c814b8904504226cdb1633056084b0aabf466e21c276506786f4 /after/bin/sort
bc9c507c8ecf43c2b5d6561ef5d2079ad8a3eb9bd400ee9ac877d6014e1945c4 /after/bin/split
48bc6a7172277d53cba1c1c40d8bb17f5144d6640e3a8c6ee230713663d58471 /after/bin/stat
4c768645e03dfd4038f8d9f3204eee6f8738aa99bd772229e9c1cff78dc0cdcb /after/bin/stdbuf
8f2f16382ce6d80cb0ebe5fc9f34b3ad57255aa9ee43a5a5f50a140fa8a29961 /after/bin/stty
d64ac8f851f0219dd16a71b60204dcc77ee689a930e4358595fcd3e4bf15e47d /after/bin/sum
463814942a4eca3e541b763cf759f5146331935594d6aff69d1a1e8da1d52bd9 /after/bin/sync
4837bb4e3382abe4aaa989f7a1a907759635c6cae0f13088535172ff043857c8 /after/bin/tac
4b0772a93c3d6a000349137b2c0eb6bc4e0c2a38667376a0ab2728f37fac778d /after/bin/tail
601a2765ea1142d45ab84359592982483859acd9b1eaa712dce0d62010f36388 /after/bin/tee
a2e22163aaf77d89293567393ad4d9b198b712e824591241c639f69a5cf671b5 /after/bin/test
c49a201a19cbba7a153d583ae5c257ae0773bc2ef0cbe6c6f2ed194592030e74 /after/bin/timeout
ee291cf6f3a9af0bc7d5d2803fdea2138b968ce7e1d9c228a966af6b847a65ce /after/bin/touch
2b8600af9893171d8282f224e55cdf8a361cc2669cf9b11f501ad345c06e17be /after/bin/tr
bf984b62de0b142882c683ca03a56eb7869e5913d8e917758fcadb81de6f2a88 /after/bin/true
95cea6e58b4598b4ad6c4cc8d27e8c44d35e0a7b73501b576d5a4ec409c20495 /after/bin/truncate
20ae9411f3b9d1a6577a0c9d584e3dda13d8afe6f17e92615a1549a82e4fc724 /after/bin/tsort
eca6848521913240e785ea53aa0f0cf4c2f2255ae4043dcecb8fa12127d3663e /after/bin/tty
d8830e45e12e081835126ba61e3733ee92dd6b98ce9ac33fca6b3a8f0f6da97d /after/bin/uname
a7fefed8ca9ed0d21a9e5e4e6cb0f3d3a0de42bfc3ff7ecb7eb884b1a2508054 /after/bin/unexpand
1fda68497c80da9d4c3419c1953f5e86cd3b88a98b468b755606e9f2911f85be /after/bin/uniq
bad61a2a4f6b426344334ac03c698fdf2a76124087993431d8d475ddbc539d6c /after/bin/unlink
0b3c47f1417700d09e96d9f057903eed5411f18ec1b461048df29b1822046c65 /after/bin/uptime
eb178d863f7f9d7a8935891e03f8354f20e6d22485a8deffd966080ad0c73789 /after/bin/users
1c4529c1fba8371992768bca64d70d979ff91ba0256f3b3763a3f5a091b9384c /after/bin/vdir
81654f5e1deb77f7be09d5ec231d4b0f33550d91b68236e83c53407442546ad6 /after/bin/wc
e7e1c068cb667552d77825930899e05c990f6cfc042252c97cab8a104e35023d /after/bin/who
071bb22567a698ae1f48ade64460e13c7d7c60d053c11ca75a3744add5e11730 /after/bin/whoami
543f7dc9c08f2f921b83aa30edf8392aa87c51f43f0e7349ec61c56981049d36 /after/bin/yes
02ae56360b3c7a21a83c0bffba077f82f851fbf08ac26e740779060bebb2e006 /after/libexec/coreutils/libstdbuf.so

View File

@ -0,0 +1,50 @@
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Remove pre-generated files from source code.
remove_generated_files() {
find . -name '*.info' -delete
find . -name '*.gmo' -delete
}
regenerate_files() {
build-aux/gen-lists-of-programs.sh --autoconf > m4/cu-progs.m4
build-aux/gen-lists-of-programs.sh --automake > src/cu-progs.mk
build-aux/gen-single-binary.sh src/local.mk > src/single-binary.mk
touch ChangeLog
cp ../gnulib-d279bc/build-aux/po/Makefile.in.in po/Makefile.in.in
. ../../import-gnulib.sh
# Disable generation of man pages due to lack of needed perl 5.8
# dependency.
cp man/dummy-man man/help2man
# We don't have autopoint from gettext yet.
AUTOPOINT=true autoreconf-2.69 -fi
}
src_prepare() {
default
remove_generated_files
regenerate_files
}
src_configure() {
# FORCE_UNSAFE_CONFIGURE disables "you should not run configure as root"
# error from configuration system of coreutils.
FORCE_UNSAFE_CONFIGURE=1 ./configure CFLAGS="-static" \
--prefix="${PREFIX}" \
--target=i386-unknown-linux-gnu \
--host=i386-unknown-linux-gnu \
--build=i386-unknown-linux-gnu
}
src_compile() {
make PREFIX="${PREFIX}" MAKEINFO="true"
}
src_install() {
make install PREFIX="${PREFIX}" MAKEINFO="true" DESTDIR="${DESTDIR}"
}

View File

@ -0,0 +1,298 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
../gnulib-d279bc/gnulib-tool --import --local-dir=gl \
--lib=libcoreutils \
--source-base=lib \
--m4-base=m4 \
--doc-base=doc \
--tests-base=gnulib-tests \
--aux-dir=build-aux \
--with-tests \
--makefile-name=gnulib.mk \
--no-conditional-dependencies \
--no-libtool \
--macro-prefix=gl \
--avoid=canonicalize-lgpl \
--avoid=dummy \
acl \
alignof \
alloca \
announce-gen \
areadlink-with-size \
argmatch \
argv-iter \
assert \
autobuild \
backup-rename \
backupfile \
base32 \
base64 \
btowc \
buffer-lcm \
c-strcase \
calloc-gnu \
canon-host \
canonicalize \
chmodat \
chown \
chownat \
cl-strtod \
cl-strtold \
cloexec \
closein \
closeout \
config-h \
configmake \
crypto/md5 \
crypto/sha1 \
crypto/sha256 \
crypto/sha512 \
cycle-check \
d-ino \
d-type \
di-set \
diacrit \
dirfd \
dirname \
do-release-commit-and-tag \
dtoastr \
dup2 \
environ \
error \
euidaccess \
exclude \
exitfail \
explicit_bzero \
faccessat \
fadvise \
fchdir \
fclose \
fcntl \
fcntl-safer \
fd-reopen \
fdatasync \
fdl \
fdopen \
fdutimensat \
file-has-acl \
file-type \
fileblocks \
filemode \
filenamecat \
filevercmp \
flexmember \
fnmatch-gnu \
fopen-safer \
fprintftime \
freopen \
freopen-safer \
fseeko \
fstatat \
fsusage \
fsync \
ftoastr \
ftruncate \
fts \
full-read \
full-write \
getgroups \
gethrxtime \
getline \
getloadavg \
getlogin \
getndelim2 \
getopt-gnu \
getpagesize \
getpass-gnu \
gettext-h \
gettime \
gettimeofday \
getugroups \
getusershell \
git-version-gen \
gitlog-to-changelog \
gnu-make \
gnu-web-doc-update \
gnumakefile \
gnupload \
group-member \
hard-locale \
hash \
hash-pjw \
heap \
host-os \
human \
idcache \
ignore-value \
inttostr \
inttypes \
isapipe \
isatty \
isblank \
largefile \
lchmod \
lchown \
ldtoastr \
lib-ignore \
linebuffer \
link \
link-follow \
linkat \
long-options \
lstat \
maintainer-makefile \
malloc-gnu \
manywarnings \
mbrlen \
mbrtowc \
mbsalign \
mbschr \
mbslen \
mbswidth \
memcasecmp \
memchr \
memcmp2 \
mempcpy \
memrchr \
mgetgroups \
minmax \
mkancesdirs \
mkdir \
mkdir-p \
mkfifo \
mknod \
mkostemp \
mkstemp \
mktime \
modechange \
mountlist \
mpsort \
netinet_in \
non-recursive-gnulib-prefix-hack \
nproc \
nstrftime \
obstack \
open \
openat-safer \
parse-datetime \
pathmax \
perl \
physmem \
pipe-posix \
pipe2 \
posix-shell \
posixtm \
posixver \
priv-set \
progname \
pthread-cond \
pthread-mutex \
pthread-thread \
pthread_sigmask \
putenv \
quote \
quotearg \
randint \
randperm \
read-file \
readlink \
readtokens \
readtokens0 \
readutmp \
realloc-gnu \
regex \
remove \
rename \
renameat \
renameatu \
rmdir \
root-dev-ino \
rpmatch \
safe-read \
same \
save-cwd \
savedir \
savewd \
select \
selinux-at \
setenv \
settime \
sig2str \
sigaction \
smack \
ssize_t \
stat-macros \
stat-size \
stat-time \
statat \
stdbool \
stdlib-safer \
stpcpy \
stpncpy \
strdup-posix \
strncat \
strnumcmp \
strsignal \
strtoimax \
strtoumax \
symlinkat \
sys_ioctl \
sys_resource \
sys_stat \
sys_wait \
tempname \
termios \
time_rz \
timer-time \
timespec \
tzset \
uname \
unistd-safer \
unlink-busy \
unlinkat \
unlinkdir \
unlocked-io \
unsetenv \
update-copyright \
uptime \
useless-if-before-free \
userspec \
utimecmp \
utimens \
vasprintf-posix \
vc-list-files \
verify \
verror \
version-etc-fsf \
wchar-single \
wcswidth \
wcwidth \
winsz-ioctl \
winsz-termios \
write-any-file \
xalloc \
xbinary-io \
xdectoint \
xfts \
xgetcwd \
xgetgroups \
xgethostname \
xmemcoll \
xnanosleep \
xprintf \
xprintf-posix \
xreadlink \
xstrtod \
xstrtoimax \
xstrtol \
xstrtol-error \
xstrtold \
xstrtoumax \
year2038 \
yesno
../gnulib-d279bc/build-aux/prefix-gnulib-mk --lib-name=libcoreutils lib/gnulib.mk

View File

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Remove dependency on po folder because we don't have gettext yet.
--- ./Makefile.am
+++ ./Makefile.am
@@ -17,7 +17,7 @@
ALL_RECURSIVE_TARGETS =
-SUBDIRS = po . gnulib-tests
+SUBDIRS = . gnulib-tests
EXTRA_DIST = \
.mailmap \

View File

@ -0,0 +1,20 @@
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Remove dependency on gettext, because we don't have it at this stage
of the build.
--- ./configure.ac
+++ ./configure.ac
@@ -624,8 +624,8 @@ AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
# As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
# translatable strings, we must use need-formatstring-macros here.
-AM_GNU_GETTEXT([external], [need-formatstring-macros])
-AM_GNU_GETTEXT_VERSION([0.19.2])
+# AM_GNU_GETTEXT([external], [need-formatstring-macros])
+# AM_GNU_GETTEXT_VERSION([0.19.2])
# For a test of uniq: it uses the $LOCALE_FR envvar.
gt_LOCALE_FR

View File

@ -0,0 +1,38 @@
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Replace test for support of correct values produced by nanosleep.
We always assume that kernel doesn't have correct implementation and
instead use function from gnulib with fix. That fixes reproducibility
problem across different kernels.
--- ../gnulib-d279bc/m4/nanosleep.m4
+++ ../gnulib-d279bc/m4/nanosleep.m4
@@ -85,23 +85,9 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
ts_sleep.tv_nsec = 1;
#if HAVE_DECL_ALARM
{
- static struct sigaction act;
- act.sa_handler = check_for_SIGALRM;
- sigemptyset (&act.sa_mask);
- sigaction (SIGALRM, &act, NULL);
- alarm (1);
- if (nanosleep (&ts_sleep, NULL) != 0)
- return 3;
- /* Test for a minor problem: the handling of large arguments. */
- ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
- ts_sleep.tv_nsec = 999999999;
- alarm (1);
- if (nanosleep (&ts_sleep, &ts_remaining) != -1)
- return 4;
- if (errno != EINTR)
- return 5;
- if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
- return 6;
+ /* Force to use HAVE_BUG_BIG_NANOSLEEP 1 across kernels even
+ if it correctly handles big nanosleeps. */
+ return 6;
}
#else /* A simpler test for native Windows. */
if (nanosleep (&ts_sleep, &ts_remaining) < 0)

View File

@ -0,0 +1,34 @@
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Remove dependency on unicodeio.h. This drops support for outputting unicode
characters. We do that, because inclusion of unicodeio.h from gnulib brings
dependencies on gperf generated files. We don't have gperf on this stage so
we can't regenerate them.
--- ./src/printf.c
+++ ./src/printf.c
@@ -59,7 +59,6 @@
#include "die.h"
#include "error.h"
#include "quote.h"
-#include "unicodeio.h"
#include "xprintf.h"
/* The official name of this program (e.g., no 'g' prefix). */
@@ -292,8 +291,12 @@ print_esc (const char *escstart, bool octal_0)
|| (uni_value >= 0xd800 && uni_value <= 0xdfff))
die (EXIT_FAILURE, 0, _("invalid universal character name \\%c%0*x"),
esc_char, (esc_char == 'u' ? 4 : 8), uni_value);
-
- print_unicode_char (stdout, uni_value, 0);
+ putchar ('\\');
+ if (*p)
+ {
+ putchar (*p);
+ p++;
+ }
}
else
{

View File

@ -0,0 +1,26 @@
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Remove dependency on propername.h.
We do that, because inclusion of propername.h from gnulib brings dependencies
on gperf generated files. We don't have gperf at this stage so we can't
regenerate them.
--- ./src/system.h
+++ ./src/system.h
@@ -361,13 +361,13 @@ enum
#include "version-etc.h"
#undef emit_bug_reporting_address
-#include "propername.h"
/* Define away proper_name (leaving proper_name_utf8, which affects far
fewer programs), since it's not worth the cost of adding ~17KB to
the x86_64 text size of every single program. This avoids a 40%
(almost ~2MB) increase in the on-disk space utilization for the set
of the 100 binaries. */
#define proper_name(x) (x)
+#define proper_name_utf8(x, y) (x, y)
#include "progname.h"

View File

@ -3,6 +3,7 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@ -76,22 +77,29 @@ build () {
default_src_unpack() {
src_dir="${base_dir}/src"
for i in "${src_dir}"/*.tar.gz; do
[ -e "${i}" ] || continue
tar -xzf "${i}"
done
for i in "${src_dir}"/*.tar.bz2; do
[ -e "${i}" ] || continue
tar -xf "${i}" --use-compress-program=bzip2
done
for i in "${src_dir}"/*.tar.xz; do
[ -e "${i}" ] || continue
tar -xf "${i}" --use-compress-program=xz
done
for i in "${src_dir}"/*.tar; do
[ -e "${i}" ] || continue
tar -xf "${i}"
done
# Check for new tar
if test -e "${PREFIX}/libexec/rmt"; then
for i in "${src_dir}"/*; do
tar --no-same-owner -xf "${i}"
done
else
for i in "${src_dir}"/*.tar.gz; do
[ -e "${i}" ] || continue
tar -xzf "${i}"
done
for i in "${src_dir}"/*.tar.bz2; do
[ -e "${i}" ] || continue
tar -xf "${i}" --use-compress-program=bzip2
done
for i in "${src_dir}"/*.tar.xz; do
[ -e "${i}" ] || continue
tar -xf "${i}" --use-compress-program=xz
done
for i in "${src_dir}"/*.tar; do
[ -e "${i}" ] || continue
tar -xf "${i}"
done
fi
}
# Default function to prepare source code.
@ -149,3 +157,11 @@ call() {
default() {
"default_${build_stage}"
}
# Set all files modified dates to be 0 unix time.
# Should be called at the end of bootstrapping process.
# This function needs `touch` that supports --no-dereference
# (at least coreutils 8.1).
canonicalise_all_files_timestamp() {
find / -exec touch --no-dereference -t 197001010000.00 {} +
}

View File

@ -3,6 +3,7 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@ -10,6 +11,8 @@ set -e
. helpers.sh
. bootstrap.cfg
build xz-5.0.5
build automake-1.11.2
@ -18,6 +21,8 @@ build autoconf-2.69
build automake-1.15.1
build coreutils-8.32
build tar-1.34
build gmp-6.2.1
@ -28,6 +33,11 @@ build mpfr-4.1.0
build mpc-1.2.1
if [ "$FORCE_TIMESTAMPS" = True ] ; then
echo 'Forcing all files timestamps to be 0 unix time.'
canonicalise_all_files_timestamp
fi
echo "Bootstrapping completed."
exec env - PATH=/after/bin PS1="\w # " bash -i