From 04038ad828fc6299e9392d22c62d535a1940daaa Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 31 Mar 2023 11:01:58 +0200 Subject: [PATCH 01/12] Clarify a sentence in "stripping" Also fix a typo Report by Rainer Fiebig --- chapter08/stripping.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml index bbd1ed94d..70e0d6ebb 100644 --- a/chapter08/stripping.xml +++ b/chapter08/stripping.xml @@ -54,10 +54,10 @@ - If any package of which the version is different from the version + If there is any package whose version is different from the version specified by the book (either following a security advisory or satisfying personal preference), it may be necessary to update the - the library file name in save_usrlib or + library file name in save_usrlib or online_usrlib. Failing to do so may render the system completely unusable. From 92dbe964f1e726ddf6589d5083819780f49fdf23 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 31 Mar 2023 22:05:15 +0800 Subject: [PATCH 02/12] Add a script to generate ChangeLog from "git diff" --- gen-changelog.py | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100755 gen-changelog.py diff --git a/gen-changelog.py b/gen-changelog.py new file mode 100755 index 000000000..91909b254 --- /dev/null +++ b/gen-changelog.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 + +# LFS ChangeLog generator for trivial package addition, removal, and update + +from subprocess import Popen, PIPE +from urllib.request import urlopen +from os import getenv + +def get_entity(line): + line = line[1:] + if not line.startswith("= 2: + pkg = fields[1].lower() + pos = pkg.find(' ') + if pos > 0: + pkg = pkg[:pos] + tic = fields[0] + sec = len(fields) >= 3 and fields[2].startswith("high") + ticket[pkg] = tic + security.add(pkg) + +print("Plain Text:") +for (s, act) in [(upd, "Update to "), (add, "Add ")]: + for i in s: + pkgver = i + "-" + expand_entity(ent, i + "-version") + out = act + pkgver + if pkgver in ticket: + out += ' (#' + ticket[pkgver] + ')' + print(out) +for i in rem: + print("Remove", i) + +print("---------------------") + +print("XML") +name = getenv("USER") +for (s, act) in [(upd, "Update to "), (add, "Add ")]: + for i in s: + print(' ') + pkgver = i + "-" + expand_entity(ent, i + "-version") + out = ' [' + name + '] - ' + act + pkgver + "." + if pkgver in ticket: + out += " Fixes\n " + out += "#" + out += ticket[pkgver] + "." + out += "" + print(out) + print(' ') From af612e9a199b621382a46377104a538e8c89b210 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 31 Mar 2023 22:22:38 +0800 Subject: [PATCH 03/12] Package updates Update to linux-6.2.8 (#5230) Update to xz-5.4.2 (#5233) Update to coreutils-9.2 (#5232) Update to libcap-2.68 (#5236) Update to bc-6.5.0 (#5228) Update to openssl-3.1.0 (#5227) Update to texinfo-7.0.3 (#5235) Update to grep-3.10 (#5234) Update to tzdata-2023c (#5237) Update to wheel-0.40.0 (#5229) Add flit-core-3.8.0 --- chapter01/changelog.xml | 49 +++++++++++++++++ chapter08/chapter08.xml | 1 + chapter08/flit-core.xml | 115 ++++++++++++++++++++++++++++++++++++++++ packages.ent | 67 ++++++++++++----------- 4 files changed, 202 insertions(+), 30 deletions(-) create mode 100644 chapter08/flit-core.xml diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 24634ea69..8c24e1607 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,6 +39,55 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2023-03-31 + + + [xry111] - Update to grep-3.10. Fixes + #5234. + + + [xry111] - Update to wheel-0.40.0. Fixes + #5229. + + + [xry111] - Update to bc-6.5.0. Fixes + #5228. + + + [xry111] - Update to texinfo-7.0.3. Fixes + #5235. + + + [xry111] - Update to coreutils-9.2. Fixes + #5232. + + + [xry111] - Update to libcap-2.68. Fixes + #5236. + + + [xry111] - Update to tzdata-2023c. Fixes + #5237. + + + [xry111] - Update to xz-5.4.2. Fixes + #5233. + + + [xry111] - Update to linux-6.2.8. Fixes + #5230. + + + [xry111] - Update to openssl-3.1.0. Fixes + #5227. + + + [xry111] - Add flit-core-3.8.0. + + + + 2023-03-15 diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 902d1bf48..91827b88e 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -63,6 +63,7 @@ + diff --git a/chapter08/flit-core.xml b/chapter08/flit-core.xml new file mode 100644 index 000000000..ef62034ab --- /dev/null +++ b/chapter08/flit-core.xml @@ -0,0 +1,115 @@ + + + %general-entities; +]> + + + + + + flit-core + &flit-core-version; +
&flit-core-url;
+
+ + Flit-Core-&flit-core-version; + + + Flit-core + + + + + + <para>Flit-core is the distribution-building parts of Flit (a packaging + tool for simple Python modules).</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + <seglistitem> + <seg>&flit-core-fin-sbu;</seg> + <seg>&flit-core-fin-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Flit-core + + Build the package: + +pip3 wheel -w dist --no-build-isolation --no-deps $PWD + + Install the package: + +pip3 install --no-index --no-user --find-links dist flit_core + + + The meaning of the pip3 configuration options and commands: + + + wheel + + This command builds the wheel archive for this package. + + + + + -w dist + + Instructs pip to put the created wheel into the + dist directory. + + + + + install + + This command installs the package. + + + + + --no-build-isolation, + --no-deps, and + --no-index + + These options prevent fetching files from the online package + repository (PyPI). If packages are installed in the correct order, + pip won't need to fetch any files in the first place; these + options add some safety in case of user error. + + + + + --find-links dist + + Instructs pip to search for wheel archives in the + dist directory. + + + + + + + Contents of Flit-Core + + + Installed directory + + + + /usr/lib/python&python-minor;/site-packages/flit_core and + /usr/lib/python&python-minor;/site-packages/flit_core-&flit-core-version;.dist-info + + + + + + +
+ diff --git a/packages.ent b/packages.ent index 592402c1c..884a9aa68 100644 --- a/packages.ent +++ b/packages.ent @@ -58,10 +58,10 @@ - - + + - + @@ -104,10 +104,10 @@ - - + + - + @@ -207,6 +207,13 @@ + + + + + + + @@ -281,10 +288,10 @@ - - + + - + @@ -390,10 +397,10 @@ - - + + - + @@ -424,12 +431,12 @@ - + - + - + - + Fix a bug in checksum utilities causing failed checks not + reported correctly: + +sed '/if ( ! match/s/ed_checksums//' -i src/digest.c -patch -Np1 -i ../&coreutils-chmod-patch; ---> Now prepare Coreutils for compilation: autoreconf -fiv From 13eb8a3ce139293722c2b6408a079a7e03b5df71 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 1 Apr 2023 00:55:06 +0800 Subject: [PATCH 07/12] packages: Add flit-core into download page --- chapter03/packages.xml | 9 +++++++++ packages.ent | 1 + 2 files changed, 10 insertions(+) diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 92d44afaf..87238724d 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -227,6 +227,15 @@
+ + Flit-core (&flit-core-version;) - &flit-core-size;: + + Home page: + Download: + MD5 sum: &flit-core-md5; + + + Gawk (&gawk-version;) - &gawk-size;: diff --git a/packages.ent b/packages.ent index 884a9aa68..dddcaf5fc 100644 --- a/packages.ent +++ b/packages.ent @@ -211,6 +211,7 @@ + From 38eab97b1e599a87ac362a386cdf6944b12cf5b4 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 1 Apr 2023 01:22:40 +0800 Subject: [PATCH 08/12] dependencies: Add flit-core --- appendices/dependencies.xml | 44 ++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 66c6ca6f2..6387743a7 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -876,6 +876,48 @@ + + Flit-Core + + + &dependencies; + + Python + + + + + &runtime; + + Python + + + + + &testsuites; + + No test suite available + + + + + &before; + + Wheel + + + + + &external; + + + pytest + and + testpath + + + + Gawk @@ -3104,7 +3146,7 @@ &dependencies; - Python + Python and Flit-core From d98496d20c2e1b933cd8b01fdc53996013b204cb Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 1 Apr 2023 01:45:36 +0800 Subject: [PATCH 09/12] gen-changelog: Mark security fix correctly --- gen-changelog.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gen-changelog.py b/gen-changelog.py index 91909b254..2932dd9ec 100755 --- a/gen-changelog.py +++ b/gen-changelog.py @@ -72,9 +72,9 @@ for i in tsv: if pos > 0: pkg = pkg[:pos] tic = fields[0] - sec = len(fields) >= 3 and fields[2].startswith("high") + if len(fields) >= 3 and fields[2].startswith("high"): + security.add(pkg) ticket[pkg] = tic - security.add(pkg) print("Plain Text:") for (s, act) in [(upd, "Update to "), (add, "Add ")]: @@ -95,7 +95,10 @@ for (s, act) in [(upd, "Update to "), (add, "Add ")]: for i in s: print(' ') pkgver = i + "-" + expand_entity(ent, i + "-version") - out = ' [' + name + '] - ' + act + pkgver + "." + out = ' [' + name + '] - ' + act + pkgver + if pkgver in security: + out += " (security fix)" + out += "." if pkgver in ticket: out += " Fixes\n " out += "#" From b57a3babaa2d3c8a4847881910ebafecca39414a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 1 Apr 2023 01:51:19 +0800 Subject: [PATCH 10/12] Update to linux-6.2.9 (#5230) --- chapter01/changelog.xml | 8 ++++---- packages.ent | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 8c24e1607..3f8583217 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,10 @@ 2023-03-31 + + [xry111] - Update to linux-6.2.9 (security fix). Fixes + #5230. + [xry111] - Update to grep-3.10. Fixes #5234. @@ -74,10 +78,6 @@ [xry111] - Update to xz-5.4.2. Fixes #5233. - - [xry111] - Update to linux-6.2.8. Fixes - #5230. - [xry111] - Update to openssl-3.1.0. Fixes #5227. diff --git a/packages.ent b/packages.ent index dddcaf5fc..88ddfe414 100644 --- a/packages.ent +++ b/packages.ent @@ -432,12 +432,12 @@ - + - + - + + + Flit-core-&flit-core-version; + + diff --git a/chapter08/flit-core.xml b/chapter08/flit-core.xml index ef62034ab..229a369ed 100644 --- a/chapter08/flit-core.xml +++ b/chapter08/flit-core.xml @@ -38,7 +38,7 @@ - Installation of Flit-core + Installation of Flit-Core Build the package: From fd531b84c94f504f604c37f397f46c381e88841a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 1 Apr 2023 05:47:17 +0800 Subject: [PATCH 12/12] flit-core: Kill revision='systemd' I copied from jinja2 and edited the file, but forgot to remove this. --- chapter08/flit-core.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/flit-core.xml b/chapter08/flit-core.xml index 229a369ed..641ff73b7 100644 --- a/chapter08/flit-core.xml +++ b/chapter08/flit-core.xml @@ -5,7 +5,7 @@ %general-entities; ]> - +