-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild-system.sh
executable file
·7851 lines (7827 loc) · 284 KB
/
build-system.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
#
# Builds the core MassOS system (Stage 2) in a chroot environment.
# Copyright (C) 2021-2025 Daniel Massey / MassOS Developers.
#
# This script is part of the MassOS build system. It is licensed under GPLv3+.
# See the 'LICENSE' file for the full license text. On a MassOS system, this
# document can also be found at '/usr/share/massos/LICENSE'.
#
# === IF RESUMING A FAILED BUILD, DO NOT REMOVE ANY LINES BEFORE LINE 26 ===
#
# Exit if something goes wrong.
set -e
# Disabling hashing is useful so the newly built tools are detected.
set +h
# Ensure we're running in the MassOS chroot.
if [ $EUID -ne 0 ] || [ ! -d /root/mbs/sources ]; then
echo "This script should not be run manually." >&2
echo "stage2.sh will automatically run it in a chroot environment." >&2
exit 1
fi
# Change to the source tarballs directory and set up the environment.
pushd /root/mbs/work
. ../build.env
# === REMOVE LINES BELOW THIS FOR RESUMING A FAILED BUILD ===
# Mark the build as started, for Stage 2 resume.
touch ../.BUILD_HAS_STARTED
# Setup the full filesystem structure.
mkdir -p /{boot{,/efi},etc/{opt,sysconfig},home,mnt,opt,srv}
mkdir -p /usr/{,local/}{bin,include,lib,libexec,share/{color,dict,doc,info,locale,man,misc,terminfo,zoneinfo},src}
mkdir -p /var/{cache,lib/{color,misc,locate},local,log,mail,opt,spool}
mkdir -p /usr/lib/firmware
ln -sf bin /usr/local/sbin
ln -sf lib /usr/local/lib64
ln -sfr /run /var/run
ln -sfr /run/lock /var/lock
ln -sfr /run/media /media
install -dm1777 /tmp /var/tmp
touch /var/log/{btmp,lastlog,faillog,wtmp}
chmod 664 /var/log/lastlog
chmod 600 /var/log/btmp
# Correctly set the permissions of the root user's home directory.
chmod 0750 /root
# Set the locale correctly (note that it is normal for a warning to be given).
mkdir -p /usr/lib/locale
mklocales
# Install Rust and Go to temporary directories for building some packages.
tar -xf ../sources/rust-1.84.1-x86_64-unknown-linux-gnu.tar.gz
pushd rust-1.84.1-x86_64-unknown-linux-gnu
./install.sh --prefix=/root/mbs/extras/rust --without=rust-docs
tar -xf ../../sources/cargo-c-x86_64-unknown-linux-musl.tar.gz -C /root/mbs/extras/rust/bin
tar -xf ../../sources/bindgen-cli-x86_64-unknown-linux-gnu.tar.xz -C /root/mbs/extras/rust/bin --strip-components=1 bindgen-cli-x86_64-unknown-linux-gnu/bindgen
install -t /root/mbs/extras/rust/bin -Dm755 ../../sources/cbindgen
popd
rm -rf rust-1.84.1-x86_64-unknown-linux-gnu
tar -xf ../sources/go1.23.4.linux-amd64.tar.gz -C /root/mbs/extras
# Bison (circular deps; rebuilt later).
tar -xf ../sources/bison-3.8.2.tar.xz
pushd bison-3.8.2
./configure --prefix=/usr
make
make install
popd
rm -rf bison-3.8.2
# Ncurses (circular deps; rebuilt later).
tar -xf ../sources/ncurses-6.5.tar.gz
pushd ncurses-6.5
mkdir -p build; pushd build
../configure
make -C include
make -C progs tic
popd
./configure --prefix=/usr --mandir=/usr/share/man --with-cxx-shared --with-manpage-format=normal --with-shared --without-ada --without-debug --without-normal --enable-widec --disable-stripping
make
make TIC_PATH="$PWD"/build/progs/tic install
ln -sf libncursesw.so /usr/lib/libncurses.so
sed -i 's/^#if.*XOPEN.*$/#if 1/' /usr/include/curses.h
popd
rm -rf ncurses-6.5
# Perl (circular deps; rebuilt later).
tar -xf ../sources/perl-5.40.1.tar.xz
pushd perl-5.40.1
./Configure -des -Doptimize="$CFLAGS" -Dprefix=/usr -Dvendorprefix=/usr -Duseshrplib -Dprivlib=/usr/lib/perl5/5.40/core_perl -Darchlib=/usr/lib/perl5/5.40/core_perl -Dsitelib=/usr/lib/perl5/5.40/site_perl -Dsitearch=/usr/lib/perl5/5.40/site_perl -Dvendorlib=/usr/lib/perl5/5.40/vendor_perl -Dvendorarch=/usr/lib/perl5/5.40/vendor_perl
make
make install
popd
rm -rf perl-5.40.1
# Python (circular deps; rebuilt later).
tar -xf ../sources/Python-3.13.2.tar.xz
pushd Python-3.13.2
./configure --prefix=/usr --enable-shared --without-ensurepip --disable-test-modules
make
make install
popd
rm -rf Python-3.13.2
# Texinfo (circular deps; rebuilt later).
tar -xf ../sources/texinfo-7.2.tar.xz
pushd texinfo-7.2
./configure --prefix=/usr
make
make install
popd
rm -rf texinfo-7.2
# util-linux (circular deps; rebuilt later).
tar -xf ../sources/util-linux-2.40.4.tar.xz
pushd util-linux-2.40.4
mkdir -p /var/lib/hwclock
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime --prefix=/usr --sysconfdir=/etc --localstatedir=/var --runstatedir=/run --bindir=/usr/bin --libdir=/usr/lib --sbindir=/usr/bin --disable-static --disable-chfn-chsh --disable-liblastlog2 --disable-login --disable-nologin --disable-pylibmount --disable-runuser --disable-setpriv --disable-su --disable-use-tty-group --without-python
make
make install
popd
rm -rf util-linux-2.40.4
# man-pages.
tar -xf ../sources/man-pages-6.10.tar.xz
pushd man-pages-6.10
rm -f man3/crypt*
make prefix=/usr install
install -t /usr/share/licenses/man-pages -Dm644 LICENSES/*
popd
rm -rf man-pages-6.10
# iana-etc.
tar -xf ../sources/iana-etc-20250123.tar.gz
install -t /etc -Dm644 iana-etc-20250123/{protocols,services}
install -dm755 /usr/share/licenses/iana-etc
cat > /usr/share/licenses/iana-etc/LICENSE << "END"
Copyright 2017 Jörg Thalheim
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
END
rm -rf iana-etc-20250123
# Glibc.
tar -xf ../sources/glibc-2.41.tar.xz
pushd glibc-2.41
patch -Np1 -i ../../patches/glibc-2.40-vardirectories.patch
mkdir -p build; pushd build
echo "rootsbindir=/usr/bin" > configparms
CFLAGS="-O2" CXXFLAGS="-O2" ../configure --prefix=/usr --with-pkgversion="MassOS Glibc 2.41" --with-bugurl="https://github.com/MassOS-Linux/MassOS/issues" --enable-kernel=5.10 --enable-stack-protector=strong --disable-nscd --disable-werror libc_cv_slibdir=/usr/lib
make
sed -i '/test-installation/s@$(PERL)@echo not running@' ../Makefile
make install
sed -i '/RTLDLIST=/s@/usr@@g' /usr/bin/ldd
sed -e '/#/d' -e '/SUPPORTED-LOCALES/d' -e 's|\\||g' -e 's|/| |g' -e 's|^|#|g' -e 's|#en_US.UTF-8|en_US.UTF-8|' ../localedata/SUPPORTED >> /etc/locales
mklocales
install -t /usr/share/licenses/glibc -Dm644 ../COPYING ../COPYING.LIB ../LICENSES
popd; popd
rm -rf glibc-2.41
# tzdata.
mkdir -p tzdata; pushd tzdata
tar -xf ../../sources/tzdata2025a.tar.gz
mkdir -p /usr/share/zoneinfo/{posix,right}
for r in etcetera southamerica northamerica europe africa antarctica asia australasia backward; do zic -L /dev/null -d /usr/share/zoneinfo $r; zic -L /dev/null -d /usr/share/zoneinfo/posix $r; zic -L leapseconds -d /usr/share/zoneinfo/right $r; done
install -t /usr/share/zoneinfo -Dm644 {iso3166,zone{,1970}}.tab
zic -d /usr/share/zoneinfo -p America/New_York
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
install -t /usr/share/licenses/tzdata -Dm644 LICENSE
popd
rm -rf tzdata
# zlib.
tar -xf ../sources/zlib-1.3.1.tar.xz
pushd zlib-1.3.1
./configure --prefix=/usr
make
make install
rm -f /usr/lib/libz.a
head -n28 zlib.h | tail -n25 | install -Dm644 /dev/stdin /usr/share/licenses/zlib/LICENSE
popd
rm -rf zlib-1.3.1
# bzip2.
tar -xf ../sources/bzip2-1.0.8.tar.gz
pushd bzip2-1.0.8
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
make -f Makefile-libbz2_so CFLAGS="$CFLAGS -fPIC"
make clean
make CFLAGS="$CFLAGS"
make PREFIX=/usr install
cp -a libbz2.so.* /usr/lib
ln -s libbz2.so.1.0.8 /usr/lib/libbz2.so
cp bzip2-shared /usr/bin/bzip2
for i in /usr/bin/{bzcat,bunzip2}; do
ln -sf bzip2 $i
done
rm -f /usr/lib/libbz2.a
install -t /usr/share/licenses/bzip2 -Dm644 LICENSE
popd
rm -rf bzip2-1.0.8
# xz.
tar -xf ../sources/xz-5.6.4.tar.xz
pushd xz-5.6.4
./configure --prefix=/usr --disable-static
make
make install
install -t /usr/share/licenses/xz -Dm644 COPYING COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1
popd
rm -rf xz-5.6.4
# LZ4.
tar -xf ../sources/lz4-1.10.0.tar.gz
pushd lz4-1.10.0
make PREFIX=/usr BUILD_STATIC=no CFLAGS="$CFLAGS"
make PREFIX=/usr BUILD_STATIC=no install
install -t /usr/share/licenses/lz4 -Dm644 LICENSE
popd
rm -rf lz4-1.10.0
# ZSTD.
tar -xf ../sources/zstd-1.5.6.tar.gz
pushd zstd-1.5.6
make prefix=/usr CFLAGS="$CFLAGS -fPIC"
make prefix=/usr install
rm -f /usr/lib/libzstd.a
install -t /usr/share/licenses/zstd -Dm644 COPYING LICENSE
popd
rm -rf zstd-1.5.6
# pigz.
tar -xf ../sources/pigz-2.8.tar.gz
pushd pigz-2.8
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
install -t /usr/bin -Dm755 pigz unpigz
install -t /usr/share/man/man1 -Dm644 pigz.1
ln -sf pigz.1 /usr/share/man/man1/unpigz.1
install -dm755 /usr/share/licenses/pigz
cat README | tail -n18 > /usr/share/licenses/pigz/LICENSE
popd
rm -rf pigz-2.8
# lzip.
tar -xf ../sources/lzip-1.24.1.tar.gz
pushd lzip-1.24.1
./configure CXXFLAGS="$CXXFLAGS" --prefix=/usr
make
make install
install -t /usr/share/licenses/lzip -Dm644 COPYING
popd
rm -rf lzip-1.24.1
# Readline.
tar -xf ../sources/readline-8.2.13.tar.gz
pushd readline-8.2.13
./configure --prefix=/usr --disable-static --with-curses
make SHLIB_LIBS="-lncursesw"
make SHLIB_LIBS="-lncursesw" install
install -t /usr/share/licenses/readline -Dm644 COPYING
popd
rm -rf readline-8.2.13
# m4.
tar -xf ../sources/m4-1.4.19.tar.xz
pushd m4-1.4.19
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/m4 -Dm644 COPYING
popd
rm -rf m4-1.4.19
# bc.
tar -xf ../sources/bc-7.0.3.tar.xz
pushd bc-7.0.3
CC=gcc ./configure.sh --prefix=/usr --disable-generated-tests --enable-readline
make
make install
install -t /usr/share/licenses/bc -Dm644 LICENSE.md
popd
rm -rf bc-7.0.3
# Flex.
tar -xf ../sources/flex-2.6.4.tar.gz
pushd flex-2.6.4
./configure --prefix=/usr --disable-static
make
make install
ln -sf flex /usr/bin/lex
ln -sf flex.1 /usr/share/man/man1/lex.1
ln -sf flex.info /usr/share/info/lex.info
install -t /usr/share/licenses/flex -Dm644 COPYING
popd
rm -rf flex-2.6.4
# pkconf (replaces pkg-config).
tar -xf ../sources/pkgconf-2.3.0.tar.xz
pushd pkgconf-2.3.0
./configure --prefix=/usr --disable-static
make
make install
ln -sf pkgconf /usr/bin/pkg-config
ln -sf pkgconf.1 /usr/share/man/man1/pkg-config.1
install -t /usr/share/licenses/pkgconf -Dm644 COPYING
ln -sf pkgconf /usr/share/licenses/pkg-config
popd
rm -rf pkgconf-2.3.0
# Binutils.
tar -xf ../sources/binutils-2.44.tar.xz
pushd binutils-2.44
mkdir -p build; pushd build
CFLAGS="-O2" CXXFLAGS="-O2" ../configure --prefix=/usr --sysconfdir=/etc --with-pkgversion="MassOS Binutils 2.44" --with-bugurl="https://github.com/MassOS-Linux/MassOS/issues" --with-system-zlib --enable-default-hash-style=gnu --enable-gold --enable-install-libiberty --enable-ld=default --enable-new-dtags --enable-plugins --enable-relro --enable-shared --disable-werror
make tooldir=/usr
make -j1 tooldir=/usr install
rm -f /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a
install -t /usr/share/licenses/binutils -Dm644 ../COPYING ../COPYING.LIB ../COPYING3 ../COPYING3.LIB
popd; popd
rm -rf binutils-2.44
# GMP.
tar -xf ../sources/gmp-6.3.0.tar.xz
pushd gmp-6.3.0
./configure --prefix=/usr --enable-cxx --disable-static
make
make install
install -t /usr/share/licenses/gmp -Dm644 COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv3
popd
rm -rf gmp-6.3.0
# MPFR.
tar -xf ../sources/mpfr-4.2.1.tar.xz
pushd mpfr-4.2.1
./configure --prefix=/usr --disable-static --enable-thread-safe
make
make install
install -t /usr/share/licenses/mpfr -Dm644 COPYING COPYING.LESSER
popd
rm -rf mpfr-4.2.1
# MPC.
tar -xf ../sources/mpc-1.3.1.tar.gz
pushd mpc-1.3.1
./configure --prefix=/usr --disable-static
make
make install
install -t /usr/share/licenses/mpc -Dm644 COPYING.LESSER
popd
rm -rf mpc-1.3.1
# ISL.
tar -xf ../sources/isl-0.27.tar.xz
pushd isl-0.27
./configure --prefix=/usr --disable-static
make
make install
install -dm755 /usr/share/gdb/auto-load/usr/lib
mv /usr/lib/libisl.so*-gdb.py /usr/share/gdb/auto-load/usr/lib
install -t /usr/share/licenses/isl -Dm644 LICENSE
popd
rm -rf isl-0.27
# Attr.
tar -xf ../sources/attr-2.5.2.tar.xz
pushd attr-2.5.2
./configure --prefix=/usr --disable-static --sysconfdir=/etc
make
make install
install -t /usr/share/licenses/attr -Dm644 doc/COPYING doc/COPYING.LGPL
popd
rm -rf attr-2.5.2
# Acl.
tar -xf ../sources/acl-2.3.2.tar.xz
pushd acl-2.3.2
./configure --prefix=/usr --disable-static
make
make install
install -t /usr/share/licenses/acl -Dm644 doc/COPYING doc/COPYING.LGPL
popd
rm -rf acl-2.3.2
# libxcrypt.
tar -xf ../sources/libxcrypt-4.4.38.tar.xz
pushd libxcrypt-4.4.38
mkdir -p build-normal build-compat
pushd build-normal
../configure --prefix=/usr --enable-hashes=glibc,strong --enable-obsolete-api=no --disable-failure-tokens --disable-static
popd
pushd build-compat
../configure --prefix=/usr --enable-hashes=glibc,strong --enable-obsolete-api=glibc --disable-failure-tokens --disable-static
popd
make -C build-normal
make -C build-compat
make -C build-normal install
install -t /usr/lib -Dm755 build-compat/.libs/libcrypt.so.1.1.0
ln -sf libcrypt.so.1.1.0 /usr/lib/libcrypt.so.1
ldconfig
install -t /usr/share/licenses/libxcrypt -Dm644 COPYING.LIB LICENSING
popd
rm -rf libxcrypt-4.4.38
# Libcap.
tar -xf ../sources/libcap-2.73.tar.xz
pushd libcap-2.73
sed -i '/install -m.*STA/d' libcap/Makefile
make prefix=/usr lib=lib CFLAGS="$CFLAGS -fPIC"
make prefix=/usr lib=lib install
chmod 755 /usr/lib/lib{cap,psx}.so.2.73
install -t /usr/share/licenses/libcap -Dm644 License
popd
rm -rf libcap-2.73
# CrackLib.
tar -xf ../sources/cracklib-2.10.3.tar.bz2
pushd cracklib-2.10.3
CPPFLAGS="-I/usr/include/$(readlink /usr/bin/python3)" ./configure --prefix=/usr --sbindir=/usr/bin --disable-static --with-python --with-default-dict=/usr/lib/cracklib/pw_dict
make
make install
install -dm755 /usr/lib/cracklib
bzip2 -cd ../../sources/cracklib-words-2.10.3.bz2 > /usr/share/dict/cracklib-words
ln -sf cracklib-words /usr/share/dict/words
echo "massos" > /usr/share/dict/cracklib-extra-words
create-cracklib-dict /usr/share/dict/cracklib-words /usr/share/dict/cracklib-extra-words
install -t /usr/share/licenses/cracklib -Dm644 COPYING.LIB
popd
rm -rf cracklib-2.10.3
# Linux-PAM (older autotools version - new Meson version will be built later).
tar -xf ../sources/Linux-PAM-1.6.1.tar.xz
pushd Linux-PAM-1.6.1
patch -Np1 -i ../../patches/Linux-PAM-1.6.1-pamconfig.patch
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --sbindir=/usr/bin --enable-securedir=/usr/lib/security --disable-doc
make
make install
chmod 4755 /usr/bin/unix_chkpwd
install -t /etc/pam.d -Dm644 pam.d/*
popd
rm -rf Linux-PAM-1.6.1
# libpwquality (Python bindings will be built later).
tar -xf ../sources/libpwquality-1.4.5.tar.bz2
pushd libpwquality-1.4.5
./configure --prefix=/usr --disable-static --with-securedir=/usr/lib/security --disable-python-bindings
make
make install
install -t /usr/share/licenses/libpwquality -Dm644 COPYING
popd
rm -rf libpwquality-1.4.5
# Libcap (PAM module only, which could not be built before).
tar -xf ../sources/libcap-2.73.tar.xz
pushd libcap-2.73
make CFLAGS="$CFLAGS -fPIC" -C pam_cap
install -t /usr/lib/security -Dm755 pam_cap/pam_cap.so
install -t /etc/security -Dm644 pam_cap/capability.conf
popd
rm -rf libcap-2.73
# Shadow (initial build; will be rebuilt later to support AUDIT).
tar -xf ../sources/shadow-4.17.2.tar.xz
pushd shadow-4.17.2
patch -Np1 -i ../../patches/shadow-4.17.2-MassOS.patch
touch /usr/bin/passwd
./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --disable-static --with-bcrypt --with-group-name-max-length=32 --with-libcrack --with-yescrypt --without-libbsd
make
make exec_prefix=/usr pamdir= install
make -C man install-man
chmod 0600 /etc/default/useradd
pwconv
grpconv
install -t /etc/pam.d -Dm644 pam.d/*
rm -f /etc/{limits,login.access}
install -t /usr/share/licenses/shadow -Dm644 COPYING
popd
rm -rf shadow-4.17.2
# GCC.
tar -xf ../sources/gcc-14.2.0.tar.xz
pushd gcc-14.2.0
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
mkdir -p build; pushd build
CFLAGS="-O2" CXXFLAGS="-O2" ../configure LD=ld --prefix=/usr --with-pkgversion="MassOS GCC 14.2.0" --with-bugurl="https://github.com/MassOS-Linux/MassOS/issues" --with-system-zlib --enable-languages=c,c++ --enable-default-pie --enable-default-ssp --enable-host-pie --enable-linker-build-id --disable-fixincludes --disable-multilib
make
make install
ln -sfr /usr/bin/cpp /usr/lib
ln -sf ../../libexec/gcc/$(gcc -dumpmachine)/$(gcc -dumpversion)/liblto_plugin.so /usr/lib/bfd-plugins/
ln -sf gcc.1 /usr/share/man/man1/cc.1
mkdir -p /usr/share/gdb/auto-load/usr/lib
mv /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
find /usr -depth -name x86_64-stage1-linux-gnu\* | xargs rm -rf
install -t /usr/share/licenses/gcc -Dm644 ../COPYING ../COPYING.LIB ../COPYING3 ../COPYING3.LIB ../COPYING.RUNTIME
popd; popd
rm -rf gcc-14.2.0
# unifdef.
tar -xf ../sources/unifdef-2.12.tar.gz
pushd unifdef-2.12
make
make prefix=/usr install
install -t /usr/share/licenses/unifdef -Dm644 COPYING
popd
rm -rf unifdef-2.12
# Ncurses.
tar -xf ../sources/ncurses-6.5.tar.gz
pushd ncurses-6.5
mkdir -p build; pushd build
../configure --prefix=/usr --mandir=/usr/share/man --enable-pc-files --with-shared --with-cxx-shared --without-debug --without-normal --with-pkg-config-libdir=/usr/lib/pkgconfig
make
make DESTDIR=$PWD/temp install
install -t /usr/lib -Dm755 temp/usr/lib/libncursesw.so.6.5
rm -f temp/usr/lib/libncursesw.so.6.5
sed -i 's/^#if.*XOPEN.*$/#if 1/' temp/usr/include/curses.h
cp -a temp/* /
for lib in ncurses form panel menu; do
ln -sf lib${lib}w.so /usr/lib/lib${lib}.so
ln -sf ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
done
ln -sf libncursesw.so /usr/lib/libcurses.so
ln -sf libncursesw.so /usr/lib/libtinfo.so
ldconfig
install -t /usr/share/licenses/ncurses -Dm644 ../COPYING
popd; popd
rm -rf ncurses-6.5
# libedit.
tar -xf ../sources/libedit-20240808-3.1.tar.gz
pushd libedit-20240808-3.1
sed -i 's/history.3//g' doc/Makefile.in
./configure --prefix=/usr --disable-static
make
make install
cp /usr/share/man/man3/e{ditline,l}.3
install -t /usr/share/licenses/libedit -Dm644 COPYING
popd
rm -rf libedit-20240808-3.1
# libsigsegv.
tar -xf ../sources/libsigsegv-2.14.tar.gz
pushd libsigsegv-2.14
./configure --prefix=/usr --enable-shared --disable-static
make
make install
install -t /usr/share/licenses/libsigsegv -Dm644 COPYING
popd
rm -rf libsigsegv-2.14
# Sed.
tar -xf ../sources/sed-4.9.tar.xz
pushd sed-4.9
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/sed -Dm644 COPYING
popd
rm -rf sed-4.9
# Gettext.
tar -xf ../sources/gettext-0.23.1.tar.xz
pushd gettext-0.23.1
./configure --prefix=/usr --disable-static
make
make install
chmod 0755 /usr/lib/preloadable_libintl.so
install -t /usr/share/licenses/gettext -Dm644 COPYING
popd
rm -rf gettext-0.23.1
# Bison.
tar -xf ../sources/bison-3.8.2.tar.xz
pushd bison-3.8.2
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/bison -Dm644 COPYING
popd
rm -rf bison-3.8.2
# PCRE.
tar -xf ../sources/pcre-8.45.tar.bz2
pushd pcre-8.45
./configure --prefix=/usr --enable-unicode-properties --enable-jit --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --disable-static
make
make install
install -t /usr/share/licenses/pcre -Dm644 LICENCE
popd
rm -rf pcre-8.45
# PCRE2.
tar -xf ../sources/pcre2-10.45.tar.bz2
pushd pcre2-10.45
./configure --prefix=/usr --enable-unicode --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-pcre2test-libreadline --disable-static
make
make install
install -t /usr/share/licenses/pcre2 -Dm644 LICENCE.md
popd
rm -rf pcre2-10.45
# Grep.
tar -xf ../sources/grep-3.11.tar.xz
pushd grep-3.11
./configure --prefix=/usr
make
make install
popd
rm -rf grep-3.11
# Bash.
tar -xf ../sources/bash-5.2.37.tar.gz
pushd bash-5.2.37
./configure --prefix=/usr --without-bash-malloc --with-installed-readline
make
make install
ln -sf bash.1 /usr/share/man/man1/sh.1
install -t /usr/share/licenses/bash -Dm644 COPYING
popd
rm -rf bash-5.2.37
# bash-completion.
tar -xf ../sources/bash-completion-2.16.0.tar.xz
pushd bash-completion-2.16.0
./configure --prefix=/usr --sysconfdir=/etc
make
make install
install -t /usr/share/licenses/bash-completion -Dm644 COPYING
popd
rm -rf bash-completion-2.16.0
# libtool.
tar -xf ../sources/libtool-2.5.4.tar.xz
pushd libtool-2.5.4
./configure --prefix=/usr
make
make install
rm -f /usr/lib/libltdl.a
install -t /usr/share/licenses/libtool -Dm644 COPYING
popd
rm -rf libtool-2.5.4
# GDBM.
tar -xf ../sources/gdbm-1.24.tar.gz
pushd gdbm-1.24
./configure --prefix=/usr --disable-static --enable-libgdbm-compat
make
make install
install -t /usr/share/licenses/gdbm -Dm644 COPYING
popd
rm -rf gdbm-1.24
# gperf.
tar -xf ../sources/gperf-3.1.tar.gz
pushd gperf-3.1
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/gperf -Dm644 COPYING
popd
rm -rf gperf-3.1
# Expat.
tar -xf ../sources/expat-2.6.4.tar.xz
pushd expat-2.6.4
./configure --prefix=/usr --disable-static
make
make install
install -t /usr/share/licenses/expat -Dm644 COPYING
popd
rm -rf expat-2.6.4
# libmetalink.
tar -xf ../sources/libmetalink-0.1.3.tar.bz2
pushd libmetalink-0.1.3
./configure --prefix=/usr --enable-static=no
make
make install
install -t /usr/share/licenses/libmetalink -Dm644 COPYING
popd
rm -rf libmetalink-0.1.3
# Inetutils.
tar -xf ../sources/inetutils-2.5.tar.xz
pushd inetutils-2.5
sed -i 's/def HAVE_TERMCAP_TGETENT/ 1/' telnet/telnet.c
./configure --prefix=/usr --bindir=/usr/bin --localstatedir=/var --disable-ifconfig --disable-logger --disable-rcp --disable-rexec --disable-rlogin --disable-rsh --disable-servers --disable-whois
make
make install
install -t /usr/share/licenses/inetutils -Dm644 COPYING
popd
rm -rf inetutils-2.5
# net-tools.
tar -xf ../sources/net-tools-2.10.tar.xz
pushd net-tools-2.10
sed -e 's/I18N n/I18N y/' -e 's/HAVE_HOSTNAME_TOOLS y/HAVE_HOSTNAME_TOOLS n/' -e 's/HAVE_HOSTNAME_SYMLINKS y/HAVE_HOSTNAME_SYMLINKS n/' -i config.in
yes "" | ./configure.sh config.in
make BINDIR=/usr/bin SBINDIR=/usr/bin
make BINDIR=/usr/bin SBINDIR=/usr/bin install
install -t /usr/share/licenses/net-tools -Dm644 COPYING
popd
rm -rf net-tools-2.10
# Netcat.
tar -xf ../sources/netcat-0.7.1.tar.bz2
pushd netcat-0.7.1
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
make
make install
install -t /usr/share/licenses/netcat -Dm644 COPYING
popd
rm -rf netcat-0.7.1
# Less.
tar -xf ../sources/less-668.tar.gz
pushd less-668
./configure --prefix=/usr --sysconfdir=/etc --with-regex=pcre2
make
make install
install -t /usr/share/licenses/less -Dm644 COPYING LICENSE
popd
rm -rf less-668
# Lua.
tar -xf ../sources/lua-5.4.7.tar.gz
pushd lua-5.4.7
patch -Np1 -i ../../patches/lua-5.4.4-sharedlib+pkgconfig.patch
make MYCFLAGS="$CFLAGS -fPIC" linux-readline
make INSTALL_DATA="cp -d" INSTALL_TOP=/usr INSTALL_MAN=/usr/share/man/man1 TO_LIB="liblua.so liblua.so.5.4 liblua.so.5.4.7" install
install -t /usr/lib/pkgconfig -Dm644 lua.pc
cat src/lua.h | tail -n24 | head -n20 | sed -e 's/* //g' -e 's/*//g' > COPYING
install -t /usr/share/licenses/lua -Dm644 COPYING
popd
rm -rf lua-5.4.7
# Perl.
tar -xf ../sources/perl-5.40.1.tar.xz
pushd perl-5.40.1
BUILD_ZLIB=False BUILD_BZIP2=0 ./Configure -des -Doptimize="$CFLAGS" -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/lib/perl5/5.40/core_perl -Darchlib=/usr/lib/perl5/5.40/core_perl -Dsitelib=/usr/lib/perl5/5.40/site_perl -Dsitearch=/usr/lib/perl5/5.40/site_perl -Dvendorlib=/usr/lib/perl5/5.40/vendor_perl -Dvendorarch=/usr/lib/perl5/5.40/vendor_perl -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dpager="/usr/bin/less -isR" -Duseshrplib -Dusethreads
BUILD_ZLIB=False BUILD_BZIP2=0 make
BUILD_ZLIB=False BUILD_BZIP2=0 make install
install -t /usr/share/licenses/perl -Dm644 Copying
popd
rm -rf perl-5.40.1
# SGMLSpm
tar -xf ../sources/SGMLSpm-1.1.tar.gz
pushd SGMLSpm-1.1
chmod +w MYMETA.yml
perl Makefile.PL
make
make install
rm -f /usr/lib/perl5/5.40/core_perl/perllocal.pod
ln -sf sgmlspl.pl /usr/bin/sgmlspl
install -t /usr/share/licenses/sgmlspm -Dm644 COPYING
popd
rm -rf SGMLSpm-1.1
# XML-Parser.
tar -xf ../sources/XML-Parser-2.47.tar.gz
pushd XML-Parser-2.47
perl Makefile.PL
make
make install
popd
rm -rf XML-Parser-2.47
# Intltool.
tar -xf ../sources/intltool-0.51.0.tar.gz
pushd intltool-0.51.0
sed -i 's:\\\${:\\\$\\{:' intltool-update.in
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/intltool -Dm644 COPYING
popd
rm -rf intltool-0.51.0
# Autoconf.
tar -xf ../sources/autoconf-2.72.tar.xz
pushd autoconf-2.72
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/autoconf -Dm644 COPYING COPYINGv3 COPYING.EXCEPTION
popd
rm -rf autoconf-2.72
# Autoconf (legacy version 2.13).
tar -xf ../sources/autoconf-2.13.tar.gz
pushd autoconf-2.13
patch -Np1 -i ../../patches/autoconf-2.13-consolidated_fixes-1.patch
mv autoconf.texi autoconf213.texi
rm autoconf.info
./configure --prefix=/usr --infodir=/usr/share/info --program-suffix=2.13
make
make install
install -m644 autoconf213.info /usr/share/info
install-info --info-dir=/usr/share/info autoconf213.info
install -t /usr/share/licenses/autoconf213 -Dm644 COPYING
popd
rm -rf autoconf-2.13
# Automake.
tar -xf ../sources/automake-1.17.tar.xz
pushd automake-1.17
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/automake -Dm644 COPYING
popd
rm -rf automake-1.17
# autoconf-archive.
tar -xf ../sources/autoconf-archive-2023.02.20.tar.xz
pushd autoconf-archive-2023.02.20
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/autoconf-archive -Dm644 COPYING{,.EXCEPTION}
popd
rm -rf autoconf-archive-2023.02.20
# dotconf.
tar -xf ../sources/dotconf-1.4.1.tar.gz
pushd dotconf-1.4.1
autoreconf -fi
./configure --prefix=/usr --disable-static
make
make install
install -t /usr/share/licenses/dotconf -Dm644 COPYING
popd
rm -rf dotconf-1.4.1
# PSmisc.
tar -xf ../sources/psmisc-v23.7.tar.bz2
pushd psmisc-v23.7
sed -i 's/UNKNOWN/23.7/g' misc/git-version-gen
./autogen.sh
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/psmisc -Dm644 COPYING
popd
rm -rf psmisc-v23.7
# elfutils.
tar -xf ../sources/elfutils-0.192.tar.bz2
pushd elfutils-0.192
CFLAGS="-O2" CXXFLAGS="-O2" ./configure --prefix=/usr --sysconfdir=/etc --program-prefix="eu-" --disable-debuginfod --enable-libdebuginfod=dummy
make
make install
rm -f /usr/lib/lib{asm,dw,elf}.a
install -t /usr/share/licenses/elfutils -Dm644 COPYING COPYING-GPLV2 COPYING-LGPLV3
popd
rm -rf elfutils-0.192
# libbpf.
tar -xf ../sources/libbpf-1.5.0.tar.gz
pushd libbpf-1.5.0/src
make
make LIBSUBDIR=lib install
rm -f /usr/lib/libbpf.a
install -t /usr/share/licenses/libbpf -Dm644 ../LICENSE{,.BSD-2-Clause,.LGPL-2.1}
popd
rm -rf libbpf-1.5.0
# patchelf.
tar -xf ../sources/patchelf-0.18.0.tar.bz2
pushd patchelf-0.18.0
./configure --prefix=/usr
make
make install
install -t /usr/share/licenses/patchelf -Dm644 COPYING
popd
rm -rf patchelf-0.18.0
# strace.
tar -xf ../sources/strace-6.13.tar.xz
pushd strace-6.13
./configure --prefix=/usr --with-libdw
make
make install
install -t /usr/share/licenses/strace -Dm644 COPYING LGPL-2.1-or-later
popd
rm -rf strace-6.13
# memstrack.
tar -xf ../sources/memstrack-0.2.2.tar.gz
pushd memstrack-0.2.2
make
make install
install -t /usr/share/licenses/memstrack -Dm644 LICENSE
popd
rm -rf memstrack-0.2.2
# libffi.
tar -xf ../sources/libffi-3.4.7.tar.gz
pushd libffi-3.4.7
./configure --prefix=/usr --disable-static --disable-exec-static-tramp --disable-multi-os-directory --enable-pax_emutramp
make
make install
install -t /usr/share/licenses/libffi -Dm644 LICENSE
popd
rm -rf libffi-3.4.7
# OpenSSL.
tar -xf ../sources/openssl-3.4.0.tar.gz
pushd openssl-3.4.0
./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib shared zlib-dynamic
make
sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
make MANSUFFIX=ssl install
install -t /usr/share/licenses/openssl -Dm644 LICENSE.txt
popd
rm -rf openssl-3.4.0
# easy-rsa.
tar -xf ../sources/EasyRSA-3.2.1.tgz
pushd EasyRSA-3.2.1
install -Dm755 easyrsa /usr/bin/easyrsa
install -Dm644 openssl-easyrsa.cnf /etc/easy-rsa/openssl-easyrsa.cnf
install -Dm644 vars.example /etc/easy-rsa/vars
install -dm755 /etc/easy-rsa/x509-types/
install -m644 x509-types/* /etc/easy-rsa/x509-types/
install -t /usr/share/licenses/easy-rsa -Dm644 COPYING.md gpl-2.0.txt
popd
rm -rf EasyRSA-3.2.1
# mpdecimal.
tar -xf ../sources/mpdecimal-4.0.0.tar.gz
pushd mpdecimal-4.0.0
./configure --prefix=/usr
make
make install
rm -f /usr/lib/libmpdec{,++}.a
install -t /usr/share/licenses/mpdecimal -Dm644 COPYRIGHT.txt
popd
rm -rf mpdecimal-4.0.0
# scdoc.
tar -xf ../sources/scdoc-1.11.0.tar.gz
pushd scdoc-1.11.0
sed -i 's/-Werror//g' Makefile
make PREFIX=/usr
make PREFIX=/usr install
install -t /usr/share/licenses/scdoc -Dm644 COPYING
popd
rm -rf scdoc-1.11.0
# kmod.
tar -xf ../sources/kmod-33.tar.xz
pushd kmod-33
./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --with-module-directory=/usr/lib/modules --with-openssl --with-xz --with-zlib --with-zstd
make
make install
for t in {dep,ins,ls,rm}mod mod{info,probe}; do ln -sf kmod /usr/bin/$t; done
install -t /usr/share/licenses/kmod -Dm644 COPYING
popd
rm -rf kmod-33
# Python (initial build; will be rebuilt later to support SQLite and Tk).
tar -xf ../sources/Python-3.13.2.tar.xz
pushd Python-3.13.2
./configure --prefix=/usr --enable-shared --enable-optimizations --with-system-expat --with-system-libmpdec --with-ensurepip --disable-test-modules
make
make install
ln -sf python3 /usr/bin/python
ln -sf pydoc3 /usr/bin/pydoc
ln -sf idle3 /usr/bin/idle
ln -sf python3-config /usr/bin/python-config
ln -sf pip3 /usr/bin/pip
install -t /usr/share/licenses/python -Dm644 LICENSE
popd
rm -rf Python-3.13.2
# flit-core.
tar -xf ../sources/flit_core-3.10.1.tar.gz
pushd flit_core-3.10.1
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist flit_core
install -t /usr/share/licenses/flit-core -Dm644 LICENSE
popd
rm -rf flit_core-3.10.1
# wheel.
tar -xf ../sources/wheel-0.45.1.tar.gz
pushd wheel-0.45.1
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist wheel
install -t /usr/share/licenses/wheel -Dm644 LICENSE.txt
popd
rm -rf wheel-0.45.1
# setuptools.
tar -xf ../sources/setuptools-75.8.0.tar.gz
pushd setuptools-75.8.0
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist setuptools
install -t /usr/share/licenses/setuptools -Dm644 LICENSE
popd
rm -rf setuptools-75.8.0
# pip.
tar -xf ../sources/pip-25.0.1.tar.gz
pushd pip-25.0.1
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist pip --upgrade
install -t /usr/share/licenses/pip -Dm644 LICENSE.txt
popd
rm -rf pip-25.0.1
# packaging.
tar -xf ../sources/packaging-24.2.tar.gz
pushd packaging-24.2
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist packaging
install -t /usr/share/licenses/packaging -Dm644 LICENSE{,.APACHE,.BSD}
popd
rm -rf packaging-24.2
# pyproject-hooks.
tar -xf ../sources/pyproject_hooks-1.2.0.tar.gz
pushd pyproject_hooks-1.2.0
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist pyproject-hooks
install -t /usr/share/licenses/pyproject-hooks -Dm644 LICENSE
popd
rm -rf pyproject_hooks-1.2.0
# installer.
tar -xf ../sources/installer-0.7.0.tar.gz
pushd installer-0.7.0
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist installer
install -t /usr/share/licenses/installer -Dm644 LICENSE
popd
rm -rf installer-0.7.0
# build.
tar -xf ../sources/build-1.2.2.tar.gz
pushd build-1.2.2
pip --disable-pip-version-check wheel --no-build-isolation --no-cache-dir --no-deps -w dist .
pip --disable-pip-version-check install --root-user-action ignore --compile --no-cache-dir --no-index --no-user -f dist build
install -t /usr/share/licenses/build -Dm644 LICENSE
popd
rm -rf build-1.2.2
# Sphinx (required to build man pages of some packages).
mkdir -p /root/mbs/extras/sphinx
tar --no-same-owner --same-permissions -xf ../sources/sphinx-20250119-x86_64-python3.13-venv.tar.xz -C /root/mbs/extras/sphinx --strip-components=1
# Ninja.
tar -xf ../sources/ninja-1.12.1.tar.gz
pushd ninja-1.12.1
python configure.py --bootstrap
install -t /usr/bin -Dm755 ninja
install -Dm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
install -Dm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja
install -t /usr/share/licenses/ninja -Dm644 COPYING
popd
rm -rf ninja-1.12.1
# Meson.
tar -xf ../sources/meson-1.7.0.tar.gz
pushd meson-1.7.0
python -m build -nw -o dist
python -m installer --compile-bytecode 1 dist/*.whl
install -t /usr/share/bash-completion/completions -Dm644 data/shell-completions/bash/meson
install -t /usr/share/zsh/site-functions -Dm644 data/shell-completions/zsh/_meson
install -t /usr/share/licenses/meson -Dm644 COPYING
popd
rm -rf meson-1.7.0
# calver.
tar -xf ../sources/calver-2022.06.26.tar.gz
pushd calver-2022.06.26
echo "Version: 2022.06.26" > PKG-INFO
python -m build -nw -o dist
python -m installer --compile-bytecode 1 dist/*.whl
install -t /usr/share/licenses/calver -Dm644 LICENSE
popd
rm -rf calver-2022.06.26
# tomli.
tar -xf ../sources/tomli-2.2.1.tar.gz
pushd tomli-2.2.1
python -m build -nw -o dist
python -m installer --compile-bytecode 1 dist/*.whl
install -t /usr/share/licenses/tomli -Dm644 LICENSE
popd
rm -rf tomli-2.2.1
# PyParsing.