Commit Graph

124 Commits

Author SHA1 Message Date
Anton Midyukov
366cb49dbe Do not rsync .gitignore to build directories 2021-06-24 21:48:53 +07:00
Anton Midyukov
58f650503f log.mk: Don't write anything to build.log when DIRECT_TARGETS
build.log does not exist when they run, because the build directory
is no longer created to run them.
2021-06-23 14:46:02 +07:00
Anton Midyukov
83e0b91309 clean.mk: do not run twice make clean (distclean)
The build directory is normally removed after make clean.
2021-06-23 14:43:25 +07:00
Anton Midyukov
86f75210e0 Makefile, profile.mk: not create temp directories with DIRECT_TARGETS
See-also: https://bugzilla.altlinux.org/show_bug.cgi?id=40148
2021-06-18 18:06:29 +07:00
Anton Midyukov
8dbd0a0fee Makefile, lib/build.mk: fix usage AUTOCLEAN with DEBUG
make distclean should be launched after copying the log when
debugging is enabled.
2021-06-06 19:55:23 +07:00
Anton Midyukov
b2570d8246 lib/profile.mk, doc/params.txt: add parameter MKIMAGE_PREFIX
Previously, you had to specify two parameters MKIMAGE_PREFIX and
GLOBAL_PREFIX with the same value - the path to mkimage. And this
behavior has not been documented. The GLOBAL_PREFIX variable is
defined in mkimage in config.mk and rules.mk.
2021-05-17 18:14:29 +07:00
Anton Midyukov
b44968fc8d lib/clean.mk: fix typo in distclean
Because of this, distclean did not work. Only the symlink was
removed.
2021-04-16 17:50:22 +07:00
Anton Midyukov
e8fcdaf8e3 lib/boot.mk: Set IMAGE_PACKTYPE to isodata for e2k 2021-04-16 01:31:33 +07:00
Anton Midyukov
93e7d43f47 lib/boot.mk: Fix BOOTLOADER for e2k 2021-04-13 02:00:46 +07:00
Anton Midyukov
7c17cc5582 lib/vm.mk: .base-grub-efi available for riscv64 2021-04-04 23:16:27 +07:00
Anton Midyukov
58eea1911b boot.mk, efi, grub: Add support riscv64
For riscv64 available grub-efi.
Needed added support for mkimage (mki-copy-efiboot-chrooted).
2021-03-16 21:15:49 +07:00
Anton Midyukov
f40fe0ebc5 boot.mk, grub, syslinux: Add the ability to override BOOTLOADER
More than one BOOTLOADER may be available for the same architecture.
Set IMAGE_PACKTYPE in boot/iso, there is no point in duplicating
in different features.
Closes ALT bug 39786.
2021-03-16 18:12:48 +07:00
Anton Midyukov
de9adb0594 build-distro, boot.mk: Set BOOT_TYPE, BOOTLOADER to efiboot for aarch64
mki-copy-grubaa64boot more not needed. In addition, it did not
support the config in boot/grub instead of EFI/BOOT.
Needed mkimage >= 0.2.38-alt1
2021-02-17 13:47:39 +07:00
Anton Midyukov
30af48c871 vm.mk: Simplified conditions for choosing a bootloader depending on arch 2020-09-18 12:45:09 +07:00
Anton Midyukov
6338944604 profile.mk: pinned package branding-$$(BRANDING)-release
This is necessary to prevent accidental hit of another branding.
Usually the problem is solved by setting up pkgpriorities  in apt settings.
But this is inconvenient when you need to make building often with others
branding.
2020-05-01 23:49:56 +07:00
Anton Midyukov
a02c328447 lib/vm.mk: vm/.base-grub allowed on ppc64le 2020-04-07 22:35:52 +07:00
Anton Midyukov
e42bcdcb30 90-build-distro.mk, boot.mk, syslinux: add ARM64 EFI support for distro targets 2019-08-30 19:23:28 +03:00
Gleb Fotengauer-Malinovskiy
f47d1c09ba Use ieee1275boot as bootloader on ppc64le
ieee1275boot bootloader support was added in mkimage 0.2.27.
2019-08-19 23:31:01 +03:00
Anton Midyukov
813274a0cf lib/vm.mk: use/bootloader/* 2019-08-19 23:27:06 +03:00
Mikhail Gordeev
e1cc0863de lib/ve.mk: split package management and networking
Some images (i.e. docker and systemd-bare) require apt
but do not require etcnet.
2019-04-02 17:43:34 +03:00
Michael Shigorin
801455fece build.mk: added Conflicts: to error filter
Just stumbled into that and (falsely) blamed vseleznv@! :(
2019-03-08 17:27:24 +03:00
Ivan A. Melnikov
45b38f389d build.mk: Run mips{,64}el builds natively on mips* machines 2018-12-25 15:43:08 +03:00
cf420b2174 vm.mk: add vm/.bare-grub{,-efi}
Some images will now be better off with GRUB;
rework ve/.bare while at that (splitting the
image targets appropriately).
2018-12-24 19:36:31 +03:00
Michael Shigorin
3c2ef1c035 rework isoboot support beyond x86
Every .iso was assumed to be bootable since the very beginning[*],
and isoboot images were deemed to be x86 isolinux ones; this didn't
change with basic ppc/armh support as I never ran into hardware
that would _boot_ those ISOs, not only run the code, and it was
only e2k isodata project that finally forced this refactoring.

It's still not perfect: pack and syslinux features still end up
somewhat interwoven, and too much places care for architecture
the image is being built for (instead of archdep features tossing
their appropriate bits and pieces in).

Should help:
- any-arch regarding isodata images;
- {x86,aarch64}/efi by decoupling isoboot and isolinux;
- ppc{,64} as introducing yaboot support will be easier now;
- mipsel{,64} too, hopefully.

* I knew of school addon images baked with mkimage-profiles-desktop
  but postponed and then neglected the whole problem for years...
2018-07-25 16:49:01 +03:00
Ivan Zakharyaschev
8e94854858 profile.mk: fix thinko
find's argument order is a bit different indeed.
2018-06-05 18:22:01 +03:00
Ivan Zakharyaschev
0ecfb35700 profile.mk: safer find/grep
Don't go crazy if Dir::Etc::sourceparts/d
gives something strange (e.g., /).
2018-05-23 11:30:15 +03:00
Michael Shigorin
d010cef393 build.mk: just go on for e2k*
There's no qemu there so far, and there's no need
to fiddle with setarch either.

NB: part of this commit erroneously went into
    1c777c8ad4
    quite some time ago, sorry about the mess.
2018-05-21 22:51:07 +03:00
Michael Shigorin
cdaa9cdaa3 boot.mk, build-distro: handle e2k
It needs (and has) no isolinux in the first place;
this is also the situation with most or all non-x86
arches, the code should probably reflect that.
2018-05-21 22:50:18 +03:00
Anton Midyukov
1c777c8ad4 base+rescue: added udpcast and partclone
These two should improve rescue image usability
for system provisioning.
2018-04-23 13:20:54 +03:00
Michael Shigorin
fb750abaa9 profile.mk: update default branding
Should be ALT instead of ALT Linux now following
the update of the branding itself; ALT Linux Team
stays ALT Linux Team of course.
2016-11-29 20:35:57 +03:00
Michael Shigorin
15f0b520f1 build.mk: added AUTOCLEAN variable
This performs distclean upon successful image build.

Suggested-by: Andrey Cherepanov <cas@altlinux.org>
2016-09-12 18:48:48 +03:00
Michael Shigorin
d2fedf6d1e distro.mk: updated default distro prefix
s/ALT Linux/ALT/gc
2016-07-26 17:46:19 +03:00
Michael Shigorin
b214d5c18e vm.mk: fixed thinko regarding lilo arches
A classic brown paper bag bug: this was typed in a hospital
and that commit was a sick one indeed, the condition should
have been the opposite.

Reported-by: Ildar Mulyukov <ildar@altlinux.org>
Closes: #31982
2016-04-15 16:16:57 +03:00
Michael Shigorin
27c912ed0f vm.mk: don't install lilo for non-x86
...as it's x86-specific.
2016-03-15 09:37:00 +03:00
Michael Shigorin
3b3cf4cc93 QUICKSTART, mktmpdir, build.mk: hasher's /proc
Either /etc/hasher-priv/system or /etc/hasher-priv/user.d/$USER
must contain at least "allowed_mountpoints=/proc" for mkimage
to work for mkimage-profiles; thanks Daniil Golovanov for
providing feedback indicating the lack of the corresponding
checks.
2016-01-10 13:08:03 +03:00
Michael Shigorin
21883b057f build.mk: drop an extra space
Spotted when working on http://linuxpiter.ru slides.
2015-11-30 16:49:52 +03:00
Michael Shigorin
5c49535c59 build.mk: get rid of GREP_OPTIONS
It was superfluous in the first place indeed,
and new grep(1) considers the option deprecated.
2015-10-09 16:40:02 +03:00
Michael Shigorin
ac5dbb4bba pkg.in/lists: archdep suffices for pkglists
This is an initial implementation of architecture dependent
contents handling for package lists more or less in the vein
of mkimage-profiles-desktop's one *but* using suffix part to
filter words in or out *not* prefix part to replace it with
a comment marker (thus filtering out lines).

The syntax should be pretty obvious:

  a b@i586 c@x86_64

will get "a b" given ARCH=i586 and "a c" given ARCH=x86_64;
please see doc/archdep.txt for a more elaborate description
and a conversion script.
2015-04-20 23:09:55 +03:00
Michael Shigorin
3cb4d9ae6a introduce QUIET variable
This one reduces the amount of output that's only
interesting when one is actually watching the console
during builds (at least the early stage) -- these tend
to look boilerplate and be useless when inspecting the
output of a large batch build like [[regular]] one.
2015-04-02 20:48:42 +03:00
Michael Shigorin
ec3d40cc1b help.mk, clean.mk: drop __frontend for tty test
The __frontend variable was introduced to address the needs
of alterator-mkimage module: list the images available in
one column, purge the builddir.

Looks like we should consider other cases with redirected
stdout (cron builds, piped calls, etc) like fundamentally
non-interactive and behave the same.

So commit 3a8af6b55d888d25c1d97561ed2ecf37ff28ad71's
description is wrong now; the current cleanup rules are:

- if CLEAN=0 or DEBUG>1, don't do it;
- if CHECK or REPORT is set, don't do it;
- otherwise if at least one of the following conditions is true:
  + there's more than one target being built in a row;
  + stdout was redirected (cronjob, alterator-mkimage...);
  + metaprofile directory is read-only
  ...then do a distclean.

If that doesn't suit your needs, describe the particular
situation please.

Thanks cas@ for wondering aloud whether greppable output
is unsupported with `make help'.
2015-04-02 20:46:35 +03:00
Michael Shigorin
b2cfbc3f1f boot.mk: factor out boot/% from distro.mk
Yes these bits are related to distro/ prefixed images
still the overgeneralization in distro.mk didn't pay off
but rather hid a bug with the only boot/isolinux in use
having no dependency on use/syslinux (which is required).

Maybe this will get revisited when we have other kinds
of bootable images with other bootloaders (vm/ ones care
for themselves as of today).
2015-03-29 20:41:32 +03:00
Michael Shigorin
c293dd141c lib/functions.mk: tiny but important note
There's a particular problem with lazy evaluation
in case of BOOT_LANG: mkimage uses internal variable,
BOOT_LANG = $(GLOBAL_BOOT_LANG) (note the lack of
immediate assignment there), and if we set up

  export GLOBAL_BOOT_LANG = $(BOOT_LANG)

in the same namespace we end up with recursively
defined pair of variables; a ":=" in either place
would save the day _but_ it's not there in m-p due to
accumulator variables, e.g. USERS, which are defined
and exported by a corresponding feature and then get
populated *after* having been declared for export,
_and_ it's not in mkimage as of 0.2.16 for some reason
that might even be good (I don't know yet).
2014-11-14 15:07:09 +03:00
Michael Shigorin
a3ddce7a81 functions.mk: allow setting to an empty value
set() is a function of two variables but the and()
check for *both* is incorrect as one might need to
override a previously set variable with empty string;
this has manifested itself with a case like this:

  @$(call set,ROOTPW_EMPTY,1)
  # ...
  @$(call set,ROOTPW_EMPTY,)
2014-09-19 21:01:08 +04:00
Michael Shigorin
851b441378 profile.mk: defer RC expansion
Just spotted that .disk/profile.tgz would hold
distcfg.mk with pre-expanded $(HOME) from build
host which is both info leak (user account that
was used to build the particular image) and just
wrong given that the in-image profile archive was
conceived as a means to pass that part of build
environment over instead of tying it to vendor.

Morale: premature optimization is premature.
2014-08-27 22:30:59 +04:00
Michael Shigorin
3f547e2504 documentation: use paths relative to toplevel dir
This change is done to reduce ambiguity in some cases;
the previous intention has been to ease navigation when
staying in a particular directory, now it's been changed
in favour of convenient toplevel `git grep' in fact.

Both variants have their pros and cons, I just find myself
leaning to this one by now hence the commit.  Feel free to
provide constructive criticism :)

Some path-related bitrot has also been fixed while at that.
2014-03-05 21:36:30 +04:00
Michael Shigorin
674f7db26e clean.mk: allow to forbid cleanup explicitly
The behaviour that sort of settled didn't actually follow
the principle of the least surprise when one really wanted
to have BUILDDIR available for inspection; DEBUG=2 would be
effective to achieve that but CLEAN=0 would not.

Thanks led@ for spotting and reporting this.
2013-08-13 22:32:27 +04:00
Michael Shigorin
a18295f223 {lib,conf.d}/{ve,vm}.mk: shift the real targets
lib/*.mk aren't going to be parsed for build targets
in the near future; and the early placement of those
targets was superseded by a dedicated configuration
snippet directory so just move these bits there.
2013-06-19 16:52:02 +04:00
Michael Shigorin
ccc6486417 main.mk, build.mk: tweaks for error reporting
I've finally moved away from LC_MESSAGES=C on my main
development system half a year ago and finally spotted
that a grep for "Stop\.$" stopped to yield anything now.
2013-06-17 19:29:12 +04:00
Michael Shigorin
b337e72ead initial init feature
This one is finally there and should help reduce the
systemd-induced mess in package lists and specifications.
2013-06-17 14:03:54 +04:00
Michael Shigorin
67adab492f initial rootfs subprofile and services feature
This subprofile is akin to THE_* variables family: the configuration
bits and script hooks sitting there influence whatever chroot is
declared to be the user facing one in the end, whether it comes
from vm image or live subprofile.

The services feature ought to be a changeset of its own which would
be based on rootfs and become the base for ve/vm changes but I chose
to just do it atomically; some pre-existing duplicates are pruned now.
2013-06-17 14:03:53 +04:00