Commit Graph

2547 Commits

Author SHA1 Message Date
Arseny Maslennikov
70ad448746 build: Unconditionally nullify stdin for build scripts
When we run a build script, redirect its standard input to a newly
created pipe with no open writers. This makes the behaviour of build
scripts more robust against e. g. unsolicited interactivity (esp. if
inherited stdio points to a tty) and more reproducible.
2023-05-24 15:08:28 +03:00
Arseny Maslennikov
10160b2d46 4.0.4.187-alt1
- systemd-services.req.files: handle user units and drop-in directories
  correctly.
2023-03-22 16:31:45 +03:00
Arseny Maslennikov
95476ebe95 systemd-services.req.files: consider user units 2023-03-22 16:31:45 +03:00
Arseny Maslennikov
da32535a15 systemd-services.req.files: handle directories correctly 2023-03-22 15:24:26 +03:00
64c2725b61 4.0.4.186-alt1
- systemd-services.req.in: fixed autoreq for systemd units.
2023-01-25 19:51:20 +03:00
8b687ab59e systemd-services.req.in: fix autoreq for systemd units
Starting with systemd-239, Exec*= lines of unit files
are no longer required to reference absolute paths.
systemd-services.req, however, was expecting an absolute paths.

Given the new system-update-cleanup.service:
ExecStart=rm -fv /system-update
systemd-services.req used to find "/system-update" requirement:
systemd-services.req: /usr/src/tmp/systemd-buildroot/lib/systemd/system/system-update-cleanup.service: /system-update -> /system-update (raw, not installed)

This change updates systemd-services.req to the new systemd unit files
semantics, and also cleanups the code by removing redundant grep.
2023-01-25 19:50:49 +03:00
fcc5e33e0b 4.0.4.185-alt1
- Backport packaging '%pretrans' Lua scriptlets (ALT#36628).
2022-10-11 08:05:30 +03:00
36d9f39b47 Backport packaging '%pretrans' Lua scriptlets
Based on rpm-4.4 with minor changes.
Running functionality is not backported.

Based-on: 73260d956c ("Implemented %pretrans and %posttrans script slots.")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-10-11 08:05:12 +03:00
Gleb Fotengauer-Malinovskiy
9cabb6dd24 4.0.4.184-alt1
- build: fixed double timezone adjustment of CHANGELOGTIME tag value.
2022-07-07 05:13:02 +00:00
Gleb Fotengauer-Malinovskiy
6ffd67d220 parseChangelog.c: fix double timezone adjustment of RPMTAG_CHANGELOGTIME value
The RPMTAG_CHANGELOGTIME tag contains an array of UNIX times of
changelog entries, but changelog entries time lack information about
hour, minute, second, and timezone, so it was decided to assume noon
(12:00:00) UTC.
This commit fixes time adjustment from local timezone to UTC.
2022-07-06 16:01:07 +00:00
2b00463743 4.0.4.183-alt1
- debuginfo: Fix building of kernel modules by keeping .BTF section for kernel
  objects.
2022-06-24 00:45:50 +03:00
156cf74278 process-debuginfo: Keep .BTF section for kernel objects
`.BTF' section is needed to load kernel modules if
`CONFIG_DEBUG_INFO_BTF_MODULES' is enabled. This requirement is
introduced in Linux commit c446fdacb10d ("bpf: fix
register_btf_kfunc_id_set for !CONFIG_DEBUG_INFO_BTF").

`--keep-section=.BTF' is added also for vmlinux processing, because
commit seems to affect vmlinux (in case of `CONFIG_DEBUG_INFO_BTF').

Encountered error message:

  # modprobe nf_nat; dmesg | tail -1
  modprobe: ERROR: could not insert 'nf_nat': Unknown symbol in module, or unknown parameter (see dmesg)
  [16781.315808] missing module BTF, cannot register kfuncs

Reported-by: Andrew A. Vasilyev <andy@altlinux.org>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2022-06-24 00:36:36 +03:00
56a8a2f028 4.0.4.182-alt1
- scripts: replaced "egrep" with "grep -E", "fgrep" with "grep -F".
2022-04-26 08:00:00 +00:00
93297e9c33 s/egrep/grep -E/ 2022-04-26 08:00:00 +00:00
61e11d51a2 s/fgrep/grep -F/ 2022-04-26 08:00:00 +00:00
cf44c38b35 4.0.4.181-alt1
- lib.req: upgraded "library not found" warnings to errors:
  these warnings are real packaging errors,
  they also cause further ldd errors down the line.
2022-02-06 08:00:00 +00:00
9db3eec288 lib.req: upgrade "library not found" warnings to errors
These "library not found" warnings are real packaging errors,
they also cause further ldd errors down the line.
2022-02-06 08:00:00 +00:00
6e809aef69 4.0.4.180-alt1
- platform.in: added %pre_service_stop_posttrans_start and
  %post_service_posttrans_restart.
- README.ALT-ru_RU.UTF-8: updated (by Dmitry V. Levin).
2021-12-15 04:08:41 +00:00
12b1601256 README.ALT-ru_RU.UTF-8: Document %pre_service_stop_posttrans_start and %post_service_posttrans_restart 2021-12-15 04:07:37 +00:00
6ccdef292e platform.in: add %pre_service_stop_posttrans_start and %post_service_posttrans_restart
The names of the macros were proposed by Vitaly Chikunov (vt@) and were
approved by Dmitry V. Levin (ldv@).
2021-12-12 00:26:51 +00:00
Gleb Fotengauer-Malinovskiy
7290314714 4.0.4.179-alt1
- brp-debuginfo, process-debuginfo: added support of zstd-compressed modules.
- brp-sign-kmodules:
  + added support of zstd-compressed modules;
  + changed to skip and warn about modules compressed with unsupported method.
2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
0240974c0a brp-sign-kmodules.in: add comment regarding this script's scope 2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
8e514bdbdd brp-sign-kmodules.in: sync xz compression flags with the Linux kernel 2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
f8431643d5 brp-sign-kmodules.in: add support for zstd-compressed modules
It means that we support all module compression methods supported by
the modern Linux kernel because the v5.15 version supports gzip-, xz-,
zstd-compressed and uncompressed modules.
2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
8e9f5a8100 brp-sign-kmodules.in: rewrite module (de)compression logic
This change makes easier to add support of zstd-compressed modules in
the next commit.
2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
b80ad41451 brp-sign-kmodules.in: call nproc(1) utility once 2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
d60876ea4f brp-sign-kmodules.in: fix couple of shellcheck warnings
SC2162 ("read without -r will mangle backslashes") and SC2086: ("Double
quote to prevent globbing and word splitting").  These actually seem to
be harmless in our case.
2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
7a87954821 process-debuginfo.in: sync xz compression flags with the Linux kernel 2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
b996912c5d brp-debuginfo.in, process-debuginfo.in: add support for zstd-compressed modules 2021-11-03 03:11:44 +03:00
Gleb Fotengauer-Malinovskiy
b07d68eab5 process-debuginfo.in: rewrite module (de)compression logic
This change makes easier to add support of zstd-compressed modules in
the next commit.
2021-11-03 02:33:13 +03:00
f852e0e407 4.0.4.178-alt1
- process-lto: enhanced error diagnostics.
2021-09-09 08:00:00 +00:00
fcc291f3a6 process-lto: enhance __gnu_lto_slim diagnostics
Turn __gnu_lto_slim diagnostics into a concise phrase printed for each
faulty archive file followed by a single lengthy multi-line descriptive
text.

Suggested-by: Vitaly Chikunov <vt@altlinux.org>
Link: https://lore.altlinux.org/devel/20210827221847.arp4wv7ngnkdliwm@altlinux.org/T/#u
2021-09-08 08:00:00 +00:00
457de4ae02 process-lto: add explicit diagnostics about failed strip
While strip is verbose when it fails to process files,
it's not quite obvious that it exits with a non-zero status,
hence an explicit diagnostics message might be useful.
2021-09-08 08:00:00 +00:00
8c5c47a2a1 Remove remaining vestiges of python bindings
Build of python bindings was turned off by commit 4.0.4-alt100.97~5 made
about 5 years ago, not it's time to remove the remaining unused bits.
2021-09-08 08:00:00 +00:00
00cd0e2abb 4.0.4-alt177
- Reverted the change introduced in 4.0.4-alt174.
2021-08-25 08:00:00 +00:00
ff43db6168 Revert "Add support for --runstatedir configure option"
Unfortunately, many generated configure files do not accept this option,
failing build with the following diagnostics:
configure: error: unrecognized option: `--runstatedir=/var/run'

This reverts commit 9bed7dcbad.
2021-08-25 08:00:00 +00:00
eae4fd7c15 4.0.4-alt176
- platform.in: Added more systemd macros.
2021-08-25 02:58:35 +03:00
01d2120325 platform.in: add more systemd macros 2021-08-25 02:57:37 +03:00
4547eecb7c 4.0.4-alt175
- platform.in: Parallelize LTO with -flto=auto.
- process-lto: Fix suggestion text.
2021-08-24 22:35:31 +03:00
e080be091a platform.in: Parallelize LTO with -flto=auto
Man gcc: "Use -flto=auto to use GNU make's job server, if available, or
otherwise fall back to autodetection of the number of CPU threads
present in your system."
2021-08-24 22:34:59 +03:00
6903fbf1b7 process-lto: Fix suggestion text
Using `%define` produces error messages like this:

  [i586] error: Recursion depth(25) greater than max(24)
  [i586]  23<                                               (empty)
  [i586]  22<                                             (empty)
  [i586]  21<                                           (empty)
  [i586]  20<                                         (empty)
  [i586]  19<                                       (empty)
  [i586]  18<                                     (empty)
  [i586]  17<                                   (empty)
  [i586]  16<                                 (empty)
  [i586]  15<                               (empty)
  [i586]  14<                             (empty)
  [i586]  13<                           (empty)
  [i586]  12<                         (empty)
  [i586]  11<                       (empty)
  [i586]  10<                     (empty)
  [i586]   9<                   (empty)
  [i586]   8<                 (empty)
  [i586]   7<               (empty)
  [i586]   6<             (empty)
  [i586]   5<           (empty)
  [i586]   4<         (empty)
  [i586]   3<       (empty)
  [i586]   2<     (empty)
  [i586]   1<   -pipe -frecord-gcc-switches -Wall -g -O2
  [i586]   0< CFLAGS="-pipe -frecord-gcc-switches -Wall -g -O2
  [i586] error: line 90: CFLAGS="-pipe -frecord-gcc-switches -Wall -g -O2
  [i586] hsh-rebuild: pkg.tar: failed to fetch build dependencies.
2021-08-24 22:34:59 +03:00
e15e40078f 4.0.4-alt174
- Added support for --runstatedir configure option.
2021-08-24 08:00:00 +00:00
9bed7dcbad Add support for --runstatedir configure option
Update %configure macro to pass --runstatedir=%_runtimedir
option to configure.
Update %makeinstall macro to pass runstatedir=%buildroot%_runtimedir
argument to make.
2021-08-24 08:00:00 +00:00
25488ec95c 4.0.4-alt173
- platform.in: Enable LTO by default.
- brp: Add brp-strip-lto & process-lto scripts.
2021-08-24 01:39:36 +03:00
9fdc144edd platform.in: Enable LTO by default
To opt out:

  %define optflags_lto %nil

To compile libs add `-ffat-lto-objects' like this:

  %define optflags_lto %optflags_lto -ffat-lto-objects

Do not use `-ffat-lto-objects' for anything except exported libs as it
doubles compile time.
2021-08-24 00:52:22 +03:00
715065e999 brp: Add brp-strip-lto script
Strip LTO sections and symbols from objects and archives (static
libraries). %brp_strip_none macro is respected.

Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
2021-08-24 00:52:22 +03:00
8851274e51 4.0.4-alt172
- Fix regression introduced by forgotten file usage.
2021-08-18 01:21:31 +03:00
b893f89a7f Fix regression introduced by forgotten file usage
There was two forgotten file instances. Fix error such as:

  /root/tmp/rpm-tmp.80ZNEF: line 1: /usr/sbin/post_service: No such file or directory
  error: %post(traefik-2.4.14-alt1.x86_64) scriptlet failed, exit status 127
  error: traefik-2.4.14-alt1.x86_64: install failed

Fixes: 5ef5c8ff4 ("Use file4 instead of file")
2021-08-18 01:20:36 +03:00
ffb8342a16 4.0.4-alt171
- Use file4 instead of file.
2021-08-12 13:23:31 +03:00
5ef5c8ff4a Use file4 instead of file
This will allow upgrading system file to v5, leaving rpmbuild using
stable file v4.
2021-08-12 13:23:31 +03:00