Compare commits

...

44 Commits

Author SHA1 Message Date
Michael Shigorin
958f37028b 0.6.2.3-alt0.M60T.1
- mktmpdir: fixed sort key
2015-09-07 23:57:07 +03:00
Michael Shigorin
32c1bcaa23 mktmpdir: fixed sort key
The sort key field value has been off-by-one apparently,
"6" corresponds to "capacity" field of df -PT output
while the "available" one was meant:

Filesystem     Type  1024-blocks     Used Available Capacity Mounted on
/dev/sda9      ext4     15350768 12799972   1747980      88% /
tmpfs          tmpfs     1967204    27396   1939808       2% /tmp

1              2               3        4         5       6

This lapse has been five years old, looks like it's only
been masked by lower available space limit *and* filesystem
ordering by type so far.  It didn't hit me even now, rather
inspected the code while implementing volumes-profile-starterkit...
2015-09-07 23:46:16 +03:00
Michael Shigorin
f3c47f0730 gear-store-tags 2015-02-02 23:51:50 +03:00
Michael Shigorin
0950c70adc 0.6.2.2-alt0.M60T.1
- backported pkg/lists fix (and the commit before it)
2015-02-02 23:51:33 +03:00
Michael Shigorin
a0d39e2ed1 pkg/lists: uncrustify Makefile
The problem with the changed piece of code is that it would
- both call cp(1) multiple times if multiple *_LIST variables
  were non-empty (which is usually the case), and
- try to evaluate stdout of the called commands as a shell
  script (which would be empty unless someone passed e.g. -v
  to that cp(1) but it's crazy to rely on things like this).

So the functions should prepare arguments for a single copy
command that is predictable and could be made verbose.

Ouch.
2015-02-02 23:50:41 +03:00
Michael Shigorin
33d35de8fb pkg/lists: tweak Makefile to expand variables
The issue at hand is the hack to be employed in the init feature:

	@$(call add,THE_LISTS,$$(INIT_TYPE))

where INIT_TYPE is set separately; $(value $V) would leave that kind
of substitution unmolested while we would actually need it done.
2015-02-02 23:50:26 +03:00
Michael Shigorin
51e0fb762e gear-store-tags 2014-03-25 00:00:25 +04:00
Michael Shigorin
71c4404c4e 0.6.2.1-alt0.M60T.1
- altlinux-t6-server-ovz
2014-03-24 16:35:23 +04:00
Michael Shigorin
ed2d904ef0 install2: added branding-*-notes
Fix "License file not found" at the second step.
2014-03-24 15:58:25 +04:00
Michael Shigorin
b356d98baa t6.mk: barebones name proxy
Just like p7.mk in 1.1.x/1.0.x, this file is a kludge
serving to "rename" a particular image.
2014-03-24 15:41:22 +04:00
Michael Shigorin
33e6100d02 server.mk: more complete installer to server-ovz
It's not about "desktop vs server" but about installer-steps
included; hiddenman@ badly needs network and users setup,
those have been dropped from installer-distro-altlinux-generic
to trim testing cycles and -desktop has those.
2014-03-24 15:41:22 +04:00
Michael Shigorin
c6ee8861f4 gear-store-tags 2012-04-02 18:22:09 +03:00
Michael Shigorin
5347d342cc 0.6.2-alt1
- better live-webkiosk and initial live-flightgear
- cleanup, syslinux, xorg feature tweaks
2012-04-02 18:18:52 +03:00
Michael Shigorin
74d1e45a1c docs update
Status updates and readability tweaks all over the place.
2012-04-02 18:13:14 +03:00
Michael Shigorin
dccf9a58b5 conf.d/server.mk += server-nano
A very basic server image with sshd onboard for testing
and very basic installs; thanks legion@ for the query.
2012-04-02 17:16:27 +03:00
Michael Shigorin
9fd0bc143e more readable `make help', finally
The output was still somewhat ragged in 80x24 terminal window
with fmt(1) which wasn't anticipating the word length difference
subsequent column(1) would have to cope with later on.

Thanks Loic Cattani for his shell columnizer implementation:
https://github.com/Arko/Columnize
2012-04-02 17:16:27 +03:00
Michael Shigorin
4afd735adb live-flightgear.iso lacked sound
Thanks snejok@ for spotting the missing, I didn't get around
to tests with headphones...

Also fixed nouveau getting in after target shuffling,
and tweaked firefox homepage to be useful in this context.
2012-03-31 21:08:09 +03:00
Michael Shigorin
3d649db656 live: introduce homepage redirector knobs
There are three more variables to adjust the redirect page:
HOMEPAGE, HOMENAME and HOMEWAIT; e.g. live-webkiosk is now
quite a bit more whitelabel.
2012-03-31 21:08:09 +03:00
Michael Shigorin
b5e6906b56 syslinux configuration revisited
- incompatible change (to fix the rather broken early style):
  use/syslinux/ui-% is now use/syslinux/ui/%;

- default timeout changed to 9 seconds (long enough and keeps
  the countdown in a single figure);

- added totaltimeout of 300 seconds;

- provided live kiosk images with almost-instant boot by default;

...and some other assorted tweaks here and there, sorry.
2012-03-31 21:08:09 +03:00
Michael Shigorin
afd84973d9 live-webkiosk-mini.iso: 85M is enough
Thanks to a reviewer who came with useful feedback and a goal:
http://www.opennet.ru/openforum/vsluhforumID3/83728.html#136
the live-webkiosk image got forked into a separate one:

- dropped DRI, virtualbox GA, mc & co, docs, rpmdb;
- added Russian keyboard layout (ctrl+shift to toggle);
- rebased live-webkiosk onto live-webkiosk-mini ;-)

Maybe vbox guest additions will get back but rpmdb is a bit
impractical on a kiosk squashfs image, even in presence of
aufs rw overlay.
2012-03-31 21:08:09 +03:00
Michael Shigorin
b129c86ac1 xorg reorg
Now is the time for all fonts to be pulled in when needed and not
along with the X server and hardware drivers; tablet support is
moved to a (preexisting) specific target either.

There's no need now to arch-discriminate a few older drivers too.
2012-03-31 21:08:09 +03:00
Michael Shigorin
1b885b3d24 cleanup scripts rehashed
There's much reason for reuse instead of duplication
among the different stage2-based subprofiles.

In particular, the rather monolithic driver cleanup script
of the ancient is better done in several clear pieces with
the final depmod run.

Scripts dropping apt/rpm databases will dump pkglist first.

A script purging /boot/* will honour live-install if present.

Minor inno^Wfixups all over the map too.
2012-03-31 21:08:09 +03:00
Michael Shigorin
ea5ae29ada mind the aptitude
Folks asked to include aptitude in desktop user distros:
http://www.opennet.ru/openforum/vsluhforumID3/83728.html#117
2012-03-30 23:38:26 +03:00
Michael Shigorin
ece828c0dc image.in/Makefile: output image size too
Checking the image size is one of the usual things
after building it, and there's some media related
testing to be ported from m-p-d as well.
2012-03-29 16:30:05 +03:00
Michael Shigorin
50a0c66899 fix live-install image
Removing /boot stuff from the live root was a nice idea
to spare some space except that live-install depends on it...
2012-03-28 21:46:29 +03:00
Michael Shigorin
5ff765275b initial live-flightgear.iso
This one should help (erm... hope not the other way around!)
testing both 3D setup and FlightGear packages I happen to
maintain in a known clean environment.
2012-03-28 21:38:14 +03:00
Michael Shigorin
9555f1f69a enhanced 3D graphics support
The previous configuration would result in intel-only
3D being available since nouveau and radeon kernel modules
are packaged separately with most kernel-images; getting
NVIDIA/AMD drivers in is more tricky due to availability
of both proprietary and free implementations with the choice
being rather a tradeoff in each case (somewhat less so with
ATI/AMD drivers).

So this is a first shot at the problem: FlightGear would
freeze on me with today's nouveau.
2012-03-28 21:38:14 +03:00
Michael Shigorin
87502d2a4a live-tde += ru
This is actually a band-aid until decent l10n is there...
2012-03-28 21:37:11 +03:00
Michael Shigorin
d39b0b984a live index.html: fix typo
The <html> tag wasn't closed but actually duplicated;
thanks Aleksey Ilchenko for spotting.
2012-03-27 11:30:50 +03:00
Michael Shigorin
587eac45ec tweak the fatal errorlevel
127 is also returned by dot(1), and we're toasted
if unable to create $(BUILDDIR).
2012-03-27 08:36:23 +03:00
Michael Shigorin
d6e899d129 gear-store-tags 2012-03-26 23:24:24 +03:00
Michael Shigorin
edfdeca311 0.6.1-alt1
- ISO9660 metadata support
- initial alien VE image
2012-03-26 23:23:30 +03:00
Michael Shigorin
b6e640bd8d slimmer webkiosk with Russian layout
Thanks someone for review and feedback:
http://www.opennet.ru/openforum/vsluhforumID3/83728.html#136

Better cleanup and i18n controls are due but in the meantime,
let's at least build something actually useful.
2012-03-26 23:17:41 +03:00
Michael Shigorin
0c41e39ec0 initial alien image support
"Alien" rather means "CentOS-based" than "xenophilic" here;
in case you still wonder: http://www.altlinux.org/Hasher/CentOS
2012-03-26 22:40:40 +03:00
Michael Shigorin
ed7bf0db9f initial ISO9660 metadata support
As was noted by Alexey Shabalin in libosinfo context,
current ALT Linux images tend to lack ISO9660 metadata
-- which they did have back in the day of Master 2.4.

Please note that the data collection occurs this way
due to mkimage's config.mk resetting the values to be
empty; this was worked around by using another config
file, $(BUILDDIR)lib/iso.mk, and including it later
but that would require a separate target with per-target
CONFIG variable which isn't elegant at all given the need
to actually build up the metadata set.

So the variables were changed (to be more readable anyways)
and then proxied back to BOOT_*.  This might be cleaned up
some day after the inclusion order is tweaked or mkimage
defaults get set-if-unset-yet (?=).
2012-03-26 22:23:28 +03:00
Michael Shigorin
17bd880e19 ve/generic += openssh suite
openssh-server is in need indeed on almost any server instance;
thanks Aleksey Cheusov for reporting the shortage.

This might be amended in the future but is reasonable right now.
2012-03-25 21:46:45 +03:00
Michael Shigorin
80090d1f1a minor tweaks (no functional changes)
Mostly multiline compactions, but also use/install2/net
got factored out from distro/server-ovz for future reuse.
2012-03-21 15:55:24 +02:00
Michael Shigorin
7ffd600076 gear-store-tags 2012-03-19 19:26:10 +02:00
Michael Shigorin
1b7ce25f10 0.6.0-alt1
- reports (targets graph)
2012-03-19 19:23:38 +02:00
Michael Shigorin
5dba27d011 main.mk: factored out help targets
These are better off in their own lib/help.mk
2012-03-19 19:23:38 +02:00
Michael Shigorin
79bb3f8d6e plant SHELL beacons into all config-forming rules
As noted in doc/assumptions.txt, the SHELL based target tracing
only works for rules with recipes, even empty but present ones.

The simplest thing to do is hooking "; @:" onto the rule's tail
(one-liner with a non-printing shell builting "true" command).
2012-03-19 19:23:38 +02:00
Michael Shigorin
788cad885e initial target tracing support and reporting
The purpose is being able to examine particular target interdependency
graph for a given image having been configured to avoid convoluted
dependencies (loops in particular).

The implementation is based on SHELL hook hint by John Graham-Cumming:
http://cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
2012-03-19 19:23:38 +02:00
Michael Shigorin
a52b7476a4 initial "+shortcut" support and refactoring
It looks like the intermediate targets aren't all equal:
some define a finished feature while some create a common
lower level piece of configuration.

Let's do shortcuts for the former so that a distro line can be
more terse and descriptive; help targets in features.in/ tweaked
accordingly.
2012-03-19 13:14:07 +02:00
Michael Shigorin
deb63e0d63 gear-store-tags 2012-03-12 22:15:54 +02:00
90 changed files with 684 additions and 235 deletions

View File

@@ -1,6 +1,6 @@
Name: mkimage-profiles
Version: 0.5.7
Release: alt1
Version: 0.6.2.3
Release: alt0.M60T.1
Summary: ALT Linux based distribution metaprofile
License: GPLv2+
@@ -15,6 +15,8 @@ Requires: rsync git-core
Requires: time schedutils
Requires: mkimage >= 0.2.0
# Recommends: graphviz
%define mpdir %_datadir/%name
%add_findreq_skiplist %mpdir/*.in/*
@@ -37,7 +39,7 @@ Virtual environment template caches (OpenVZ/LXC) can be made either.
In short, setup hasher (http://en.altlinux.org/hasher) and here we go:
cd %mpdir
head README
make distro/syslinux.iso
make syslinux.iso
But if you're into regular distro hacking and are not afraid of make
and modest metaprogramming (some code generation and introspection),
@@ -59,6 +61,26 @@ cp -a * %buildroot%mpdir
%doc README QUICKSTART
%changelog
* Mon Sep 07 2015 Michael Shigorin <mike@altlinux.org> 0.6.2.3-alt0.M60T.1
- mktmpdir: fixed sort key
* Mon Feb 02 2015 Michael Shigorin <mike@altlinux.org> 0.6.2.2-alt0.M60T.1
- backported pkg/lists fix (and the commit before it)
* Mon Mar 24 2014 Michael Shigorin <mike@altlinux.org> 0.6.2.1-alt0.M60T.1
- altlinux-t6-server-ovz
* Mon Apr 02 2012 Michael Shigorin <mike@altlinux.org> 0.6.2-alt1
- better live-webkiosk and initial live-flightgear
- cleanup, syslinux, xorg feature tweaks
* Mon Mar 26 2012 Michael Shigorin <mike@altlinux.org> 0.6.1-alt1
- ISO9660 metadata support
- initial alien VE image
* Mon Mar 19 2012 Michael Shigorin <mike@altlinux.org> 0.6.0-alt1
- reports (targets graph)
* Mon Mar 12 2012 Michael Shigorin <mike@altlinux.org> 0.5.7-alt1
- distro tweaks

View File

@@ -1,6 +0,0 @@
object a8e70fd4e667a95fb429c3b77a2f45eca0da7859
type commit
tag v0.5.6
tagger Michael Shigorin <mike@altlinux.org> 1329770647 +0200
fixups

View File

@@ -0,0 +1,6 @@
object 0950c70adc1d129757a7418e57658401d6429729
type commit
tag v0.6.2.2
tagger Michael Shigorin <mike@altlinux.org> 1422910304 +0300
lists fix backported

View File

@@ -1 +1 @@
5f2dbc6d511b0a0a39799983df054a249298dd8c v0.5.6
b936ec8ec888da813b0632ea39288e6ff59debad v0.6.2.2

View File

@@ -1,7 +1,8 @@
# umbrella mkimage-profiles makefile:
# iterate over multiple goals/arches
# iterate over multiple goals/arches,
# collect proceedings
# immediate assignment
# for immediate assignment
ifndef ARCHES
ifdef ARCH
ARCHES := $(ARCH)
@@ -11,8 +12,14 @@ endif
endif
export ARCHES
# supervise target tracing; leave stderr alone
ifdef REPORT
export REPORT_PATH := $(shell mktemp --tmpdir mkimage-profiles.report.XXXXXXX)
POSTPROC := | bin/report-filter > $(REPORT_PATH)
endif
# recursive make considered useful for m-p
MAKE += --no-print-directory
MAKE += -r --no-print-directory
.PHONY: clean distclean help
clean distclean help:
@@ -23,16 +30,18 @@ export NUM_TARGETS := $(words $(MAKECMDGOALS))
# real targets need real work
%:
@n=1; \
say() { echo "$$@" >&2; }; \
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
n="`echo $(MAKECMDGOALS) \
| tr '[[:space:]]' '\n' \
| grep -nx "$@" \
| cut -d: -f1`"; \
echo "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
say "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
fi; \
for ARCH in $(ARCHES); do \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then echo; fi; \
echo "** ARCH: $$ARCH"; \
$(MAKE) -f main.mk ARCH=$$ARCH $@; \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then say; fi; \
say "** ARCH: $$ARCH" >&2; \
$(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); \
$(MAKE) -f reports.mk ARCH=$$ARCH; \
done; \
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then echo; fi
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then say; fi

9
README
View File

@@ -1,12 +1,12 @@
Welcome to mkimage-profiles!
English quickstart: make distro/server-base.iso;
English quickstart: make server-mini.iso;
see http://en.altlinux.org/Hasher (and a large tmpfs).
Configurables: ~/.mkimage/profiles.mk;
see doc/profiles.mk.sample and libdistro.mk
see doc/variables.txt and conf.d/README
License: GPLv2+, see COPYING.
License: GPLv2+, see COPYING
Most docs are in Russian, welcome to learn it or ask for English.
См. тж. http://www.altlinux.org/Mkimage/Profiles/m-p
@@ -34,7 +34,7 @@ Most docs are in Russian, welcome to learn it or ask for English.
Объекты:
- дистрибутивы и виртуальные окружения:
+ описываются в conf.d/*.mk или соответственно lib/{distro,ve}.mk
+ могут основываться одно на другом
+ могут основываться на предшественниках, расширяя их
+ дистрибутивы также:
- включают один или более субпрофилей по надобности
+ желательно избегать множественного наследования, см. тж. фичи
@@ -58,3 +58,4 @@ Most docs are in Russian, welcome to learn it or ask for English.
+ указанный явно,
+ либо ~/out/ (если возможно),
+ или $(BUILDDIR)/out/ иначе
- формируются отчёты, если запрошены (REPORTS)

36
bin/columnize Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# columnize.sh
# Take a list of values and output them in a nicely formatted column view.
# Author: Loïc Cattani "Arko" <loic cattani at gmail com>
# https://github.com/Arko/Columnize
values=($*)
longest_value=0
# Find the longest value
for value in ${values[@]}; do
if [[ ${#value} -gt $longest_value ]]; then
longest_value=${#value}
fi
done
# Compute column span
term_width=${COLUMNS:-$(tput cols)}
(( columns = $term_width / ($longest_value + 2) ))
# Print values with pretty column width
curr_col=0
for value in ${values[@]}; do
value_len=${#value}
echo -n $value
(( spaces_missing = $longest_value - $value_len + 2 ))
printf "%*s" $spaces_missing
(( curr_col++ ))
if [[ $curr_col == $columns ]]; then
echo
curr_col=0
fi
done
# Make sure there is a newline at the end
if [[ $curr_col != 0 ]]; then echo; fi

View File

@@ -45,7 +45,7 @@ choose_tmpdir() {
echo -n "$i "
df -Tl "$i" | tail -1
done \
| sort -unk6 \
| sort -unk5 \
| while read dir dev fstype size used free percent mnt; do
check_options "$dev" "$mnt" || continue
[ "$free" -gt "$MINSIZE" ] || continue

4
bin/report-filter Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
# filter worker make stdout for report scripts
grep '^trace:building ' | uniq

33
bin/report-targets Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
echo "digraph {"
echo " { node [fontname=Helvetica,fontsize=20];"
while read first second third rest; do
FROM=; TO=
case "$first" in
"trace:building")
case "$third" in
"->")
FROM="$second"; TO="$rest";;
*)
continue;;
esac
;;
*)
continue;;
esac
[ -n "$FROM" -a -n "$TO" ] || continue
for to in $TO; do
out=" \"$FROM\" -> \"$to\""
case $to in
*distro/*)
echo "$out [weight=10];";;
*)
echo "$out";;
esac
done
done
echo " }"
echo "}"

52
bin/report-targets2vars Executable file
View File

@@ -0,0 +1,52 @@
#!/bin/sh
DISTCFG=build/distcfg.mk
[ -s "$DISTCFG" ] || exit 1
VARIABLES=
echo "graph { rankdir=LR;"
echo " { node [height=.1,width=.3,fontname=Helvetica,fontsize=10];"
feat_vars()
{
FEATURE=
while read first second rest; do
case "$first" in
\#[A-Z]*)
continue;; # overridden feature
\#) # feature mark
case "$second" in
profile/*)
FEATURE=;;
*)
FEATURE="$second";;
esac
;;
*)
case "$second" in
=|+=|?=)
case "$first" in
DISTCFG_MK|SUBPROFILES|FEATURES|IMAGE*|MKIMAGE_*)
continue;;
*)
VAR="$first"
VARIABLES="$VARIABLES; $VAR"
;;
esac
;;
*)
continue;;
esac
;;
esac
[ -n "$FEATURE" -a -n "$VAR" ] || continue
echo " \"$FEATURE\" -- \"$VAR\";"
done < "$DISTCFG"
echo " { node [shape=box]$VARIABLES; }"
}
feat_vars | LC_COLLATE=C sort -ru
echo " }"
echo "}"

6
conf.d/alien.mk Normal file
View File

@@ -0,0 +1,6 @@
ve/.centos-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
ve/centos: ve/.centos-base
@$(call add,BASE_PACKAGES,openssh-server)

View File

@@ -1,25 +1,18 @@
# desktop distributions
ifeq (distro,$(IMAGE_CLASS))
distro/.desktop-base: distro/.installer \
use/syslinux/ui-vesamenu use/x11/xorg
distro/.desktop-base: distro/.installer use/syslinux/ui/vesamenu use/x11/xorg
@$(call set,INSTALLER,desktop)
distro/.desktop-mini: distro/.desktop-base \
use/lowmem use/x11/xdm use/power/acpi/button \
use/cleanup/alterator
distro/.desktop-mini: distro/.desktop-base use/x11/xdm +power; @:
distro/icewm: distro/.desktop-mini
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
distro/.desktop-network: distro/.desktop-mini use/virtualbox/guest
@$(call add,BASE_LISTS,$(call tags,(base || desktop) && network))
distro/tde: distro/.desktop-mini use/x11/kdm
@$(call add,BASE_LISTS, \
$(call tags,(base || desktop) && (network || tde)))
distro/ltsp-icewm: distro/icewm use/ltsp/base
distro/ltsp-tde: distro/tde use/ltsp/base
distro/desktop-systemd: distro/icewm use/systemd
distro/icewm: distro/.desktop-network use/lowmem +icewm; @:
distro/tde: distro/.desktop-mini +tde; @:
distro/ltsp-tde: distro/tde +ltsp; @:
distro/ltsp-icewm: distro/icewm +ltsp; @:
distro/desktop-systemd: distro/icewm use/systemd; @:
endif

View File

@@ -2,53 +2,52 @@
ifeq (distro,$(IMAGE_CLASS))
distro/syslinux: distro/.init \
use/syslinux/localboot.cfg use/syslinux/ui-vesamenu \
use/hdt use/memtest
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
distro/dos: distro/.init use/dos use/syslinux/ui-menu
distro/rescue: distro/.base use/rescue use/syslinux/ui-menu
distro/live: distro/.base use/live/base use/power/acpi/cpufreq
distro/live-systemd: distro/.base use/live/base use/systemd
distro/dos: distro/.init use/dos use/syslinux/ui/menu; @:
distro/rescue: distro/.base use/rescue use/syslinux/ui/menu; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/.live-x11: distro/live use/firmware use/power/acpi/button
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
distro/.live-desktop: distro/.base +live use/syslinux/ui/vesamenu; @:
distro/.live-kiosk: distro/.base use/live/base use/live/autologin \
use/syslinux/timeout/1 use/cleanup +power
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu)
@$(call add,CLEANUP_PACKAGES,'alterator*' 'guile*' 'vim-common')
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
distro/live-builder: distro/.base use/repo/main \
use/live/base use/dev/mkimage use/power/acpi/button
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
@$(call add,LIVE_PACKAGES,zsh sudo)
@$(call add,LIVE_PACKAGES,$(pkgs))
@$(call add,LIVE_PACKAGES,zsh sudo apt-repo)
@$(call add,MAIN_PACKAGES,rpm-build basesystem)
@$(call add,MAIN_PACKAGES,fakeroot sisyphus_check)
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
@$(call add,MAIN_PACKAGES,file make-initrd make-initrd-propagator)
@$(call add,MAIN_PACKAGES,$(pkgs))
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
distro/live-install: distro/.base use/live/base use/syslinux/localboot.cfg
distro/live-install: distro/.live-base use/syslinux/localboot.cfg
@$(call add,LIVE_PACKAGES,live-install)
distro/live-icewm: distro/.live-x11 use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || icewm)))
distro/live-razorqt: distro/.live-x11 use/x11/lightdm use/syslinux/ui-vesamenu
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || razorqt)))
distro/live-tde: distro/.live-x11 use/x11/kdm use/syslinux/ui-vesamenu
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || tde)))
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
distro/live-razorqt: distro/.live-desktop +razorqt; @:
distro/live-tde: distro/.live-desktop use/live/ru +tde; @:
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
@$(call add,LIVE_LISTS, \
$(call tags,(base || extra) && (archive || rescue || network)))
distro/live-webkiosk: distro/.live-x11 use/live/autologin use/live/hooks
distro/live-webkiosk-mini: distro/.live-kiosk use/live/hooks use/live/ru
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
@$(call add,LIVE_PACKAGES,livecd-webkiosk)
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
@$(call add,CLEANUP_PACKAGES,'libqt4*' 'qt4*')
distro/live-webkiosk: distro/live-webkiosk-mini use/live/desktop; @:
distro/live-flightgear: distro/live-icewm use/live/sound use/x11/3d-proprietary
@$(call add,LIVE_PACKAGES,FlightGear fgo)
@$(call try,HOMEPAGE,http://www.4p8.com/eric.brasseur/flight_simulator_tutorial.html)
endif

View File

@@ -1,9 +1,14 @@
# server distributions
ifeq (distro,$(IMAGE_CLASS))
distro/.server-base: distro/.installer use/syslinux/ui-menu use/memtest
distro/.server-base: distro/.installer use/syslinux/ui/menu use/memtest
@$(call add,BASE_LISTS,server-base)
distro/server-nano: distro/.server-base \
use/cleanup/x11-alterator use/bootloader/lilo
@$(call add,BASE_LISTS,$(call tags,server network))
@$(call add,BASE_PACKAGES,dhcpcd cpio)
distro/server-mini: distro/.server-base use/cleanup/x11-alterator
@$(call set,KFLAVOURS,el-smp)
@$(call add,THE_KMODULES,e1000e igb)
@@ -12,17 +17,17 @@ distro/server-mini: distro/.server-base use/cleanup/x11-alterator
$(call tags,base && (server || network || security || pkg)))
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
distro/server-systemd: distro/server-mini use/systemd use/bootloader/lilo
distro/server-systemd: distro/server-mini use/systemd use/bootloader/lilo; @:
distro/server-ovz: distro/server-mini \
distro/server-ovz: distro/server-mini use/install2/net \
use/hdt use/rescue use/firmware/server use/power/acpi/button
@$(call set,INSTALLER,desktop)
@$(call set,STAGE1_KFLAVOUR,std-def)
@$(call set,KFLAVOURS,std-def ovz-el)
@$(call add,BASE_KMODULES,rtl8168 rtl8192)
@$(call add,MAIN_KMODULES,bcmwl ndiswrapper)
@$(call add,MAIN_KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
@$(call add,MAIN_KMODULES,drbd83 kvm)
@$(call add,INSTALL2_PACKAGES,curl) ### should become curl-mini
@$(call add,BASE_LISTS,ovz-server)
@$(call add,MAIN_LISTS,kernel-wifi)
@$(call add,MAIN_GROUPS,dns-server http-server ftp-server kvm-server)
@@ -31,7 +36,7 @@ distro/server-ovz: distro/server-mini \
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
use/syslinux/ui-menu use/syslinux/localboot.cfg use/memtest
use/syslinux/ui/menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
endif

7
conf.d/t6.mk Normal file
View File

@@ -0,0 +1,7 @@
# t6 base kits
ifeq (distro,$(IMAGE_CLASS))
distro/altlinux-t6-server-ovz: distro/server-ovz; @:
endif

View File

@@ -1,7 +1,14 @@
предположения фрагментов кода об окружении
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NB: пути приводятся от верхнего уровня; проект в целом предполагает
GNU make 3.81 (с использованием которого и разрабатывается).
ALT Linux 6.0+ и GNU make 3.81 (на которых и разрабатывается),
но может быть портирован вместе с mkimage.
- lib/report.mk
+ ожидает, что каждая подлежащая трассированию цель каждого
makefile при сборке конфигурации образа содержит непустой
recipe -- хотя бы "; @:" -- т.к. зависит от запуска $(SHELL)
+ характерный признак пропуска -- разрыв графа (report-targets.png)
- pkg.in/lists/Makefile
+ ожидает, что названия пакаджлистов указываются в переменных

View File

@@ -2,7 +2,7 @@
~~~~
Особенности дистрибутива, не учитываемые в пакетной базе
или зависящие от переменных времени сборки/установки образа,
могут быть оформлены несколькими образами:
могут быть оформлены как:
* scripts.d/ или image-scripts.d/ различных стадий;
* пакеты installer-feature-*
@@ -10,7 +10,7 @@
В большинстве случаев можно рекомендовать создание feature
средствами метапрофиля, поскольку при этом дерево кода более
удобно для анализа и обновления (и в отличие от m-p-d, нет
удобно для анализа и обновления (и в отличие от m-p-d -- нет
вынужденной необходимости либо контролировать включение нужных
фич "вручную" в скриптах по косвенным признакам, либо выносить
их в пакеты installer-feature-*).

View File

@@ -1,4 +1,5 @@
# sample ~/.mkimage/profiles.mk
# NB: REPORT doesn't work here, it's somewhat special
# where to look for apt.conf; system one used by default
#APTCONF = ~/apt/apt.conf.$(ARCH)

View File

@@ -55,6 +55,11 @@
+ значение: пусто (по умолчанию), 1 или 2
+ см. ../lib/log.mk
- HOMEPAGE, HOMENAME, HOMEWAIT
+ указывают адрес, название и таймаут перехода для домашней страницы
+ значение: корректный URL, строка, целое неотрицательное число
+ см. ../features.in/live/generate.mk (тж. по умолчаниям)
- ISOHYBRID
+ включает постобработку ISO-образа isohybrid
+ значение: пусто (по умолчанию) либо любая строка
@@ -65,6 +70,12 @@
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk
- REPORT
+ запрашивает создание отчёта о собранном образе
+ значение: пусто (по умолчанию) либо любая строка
+ NB: в силу специфики обработки передаётся только явно
+ см. ../Makefile, ../report.mk, ../lib/report.mk
- SAVE_PROFILE
+ сохраняет архив сгенерированного профиля в .disk/
+ значение: пусто (по умолчанию) либо любая строка

View File

@@ -15,6 +15,11 @@
в списке, содержащемся в этой переменной, то она не задействуется
при построении профиля, а только при сборке конфигурации.
Для наиболее ходовых целей use/*, особенно если их много, можно
создавать цели-алиасы +* (например, +power). Просьба относиться
вдумчиво, т.к. в дальнейшем предполагается визуализировать такие
цели в UI конфигурирования образа.
Остальное содержимое является дополнительным и используется
в таком порядке (см. ../Makefile):

View File

@@ -2,15 +2,29 @@
# (only regarding the needed subprofiles)
ifndef BUILDDIR
help all:
help/plus all: banner
@$(call grepper,'^+')
help/features: banner
@$(call grepper,'^use/')
banner:
@echo "** BUILDDIR not defined; available features:"
grepper = $(and $(1),$(grepper_body))
define grepper_body
@for dir in */; do \
echo -n "$$dir: "; \
grep -h '^use/' $$dir/config.mk \
out="`grep -h $(1) $$dir/config.mk \
| cut -f1 -d: \
| tr ' ' '\n\n' \
| grep $(1) \
| tr '\n' ' ' \
| sort -u; \
| sort -u`"; \
[ -z "$$out" ] || echo "$$dir: $$out"; \
done
endef
else
include $(BUILDDIR)/distcfg.mk

View File

@@ -22,6 +22,10 @@
построенных на одном базовом, можно воспользоваться подкаталогом
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
Наиболее употребительные цели можно снабжать "ярлычками" вроде
"+icewm" с тем, чтобы сделать более краткими и выразительными
использующие их правила. Просьба не злоупотреблять количеством.
Каталог lib/ является специфическим для фич, определяющих
построение конкретного вида образа -- см. build-*/.

View File

@@ -1,4 +1,5 @@
Эта фича конфигурирует создание образа дистрибутива, включая работу
с субпрофилями -- которая сейчас нужна только дистрибутивным целям.
Дополняет финальную стадию сборки (lib/, scripts.d/).
Дополняет финальную стадию сборки (lib/, scripts.d/)
и тесно с ней связана.

View File

@@ -4,7 +4,17 @@
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
BOOT_TYPE = isolinux
# proxy over the ISO metadata collected; see also genisoimagerc(5)
BOOT_SYSI := $(META_SYSTEM_ID)
BOOT_PUBL := $(META_PUBLISHER)
BOOT_PREP := $(META_PREPARER)
BOOT_APPI := $(META_APP_ID)
BOOT_VOLI := $(META_VOL_ID)
BOOT_VOLS := $(META_VOL_SET)
BOOT_BIBL := $(META_BIBLIO)
BOOT_ABST := $(META_ABSTRACT)
BOOT_TYPE := isolinux
# Metadata/ needed only for installers (and not for e.g. syslinux.iso)
# FIXME: installable live needs it too, don't move to install2 feature

View File

@@ -1,3 +1,4 @@
Эта фича конфигурирует создание образа виртуального окружения (VE).
Дополняет финальную стадию сборки (lib/, image-scripts.d/).
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
и тесно с ней связана.

View File

@@ -0,0 +1,6 @@
#!/bin/sh
[ -s /etc/fstab ] || cat >> /etc/fstab <<-EOF
proc /proc proc nosuid,noexec,gid=proc 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
EOF

View File

@@ -0,0 +1,12 @@
#!/bin/sh
# FIXME: there should be less brutal i18n tuning
cd /usr/share/locale
rm -r *@*
for i in */; do
case "$i" in
be*|en*|ru*|uk*) continue;;
esac
rm -r "$i"
done
:

View File

@@ -0,0 +1,5 @@
#!/bin/sh
# remove all docs
rpmquery -ad |grep ^/ |xargs -r rm -f --
rm -rf /usr/share/{doc,man,info,license,gfxboot}

View File

@@ -0,0 +1,6 @@
#!/bin/sh -efu
# remove extra packages from a bare livecd
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y -- $list
:

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# dump what's here by this point
echo "** live packages before rpmdb purge:"
rpmquery -a --qf='%{NAME} %{VERSION}-%{RELEASE}\n'
# remove apt database and cache
find /var/lib/apt /var/cache/apt -type f -delete
# not going to need them without rpmdb, it's not even rescue anymore
rpm -e --nodeps apt libapt rpm librpmbuild librpm 2>/dev/null ||:
# finally, drop rpmdb
find /var/lib/rpm -type f -delete
:

View File

@@ -1,7 +1,12 @@
use/dev:
@$(call add_feature)
@$(call add,COMMON_PACKAGES,git-core hasher gear)
@$(call add,THE_PACKAGES,git-core hasher gear)
use/dev/mkimage: use/dev
@$(call add,COMMON_PACKAGES,mkimage)
@$(call add,LIVE_PACKAGES,shadow-change)
@$(call add,THE_PACKAGES,mkimage shadow-change)
use/dev/repo: use/dev use/repo/main
@$(call add,THE_PACKAGES,apt-repo)
@$(call add,MAIN_PACKAGES,rpm-build basesystem)
@$(call add,MAIN_PACKAGES,fakeroot sisyphus_check)
@$(call add,MAIN_PACKAGES,file make-initrd make-initrd-propagator)

View File

@@ -1,5 +1,9 @@
# tries to fill in ISO metadata in case it's the only inhabitant
use/dos: use/syslinux
@$(call add_feature)
@$(call add,SYSLINUX_CFG,dos)
@$(call add,SYSLINUX_FILES,/usr/lib/syslinux/memdisk)
@$(call add,STAGE1_PACKAGES,make-freedos-floppy glibc-gconv-modules)
@$(call try,META_SYSTEM_ID,DOS)
@$(call try,META_VOL_ID,FreeDOS 2.88M)
@$(call try,META_VOL_SET,FreeDOS)

View File

@@ -1,4 +1,4 @@
#!/bin/sh -x
#!/bin/sh
# create a barebone bootable freedos floppy
# TODO: some sub-framework to populate it as well

View File

@@ -1,4 +1,5 @@
use/hdt: use/syslinux use/memtest
# optimized out use/syslinux due to use/memtest
use/hdt: use/memtest
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,pciids)
@$(call add,SYSLINUX_MODULES,hdt)

View File

@@ -6,4 +6,5 @@
чтобы в компактном livecd, которым является инсталятор, оказались
нужные им утилиты (INSTALL2_PACKAGES). Перегружать его не следует,
поскольку это прямо влияет на требования по минимальному размеру
оперативной памяти для установки.
оперативной памяти для установки (если не задействован параметр
загрузки ядра lowmem, обрабатываемый propagator).

View File

@@ -2,5 +2,10 @@ use/install2: use/stage2 sub/stage2/install2 use/cleanup/installer
@$(call add_feature)
@$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-notes)
@$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,BASE_LISTS,$(call tags,basesystem))
### FR: curl-mini
use/install2/net: use/install2
@$(call add,INSTALL2_PACKAGES,curl)

View File

@@ -27,6 +27,4 @@ rpmquery -a cpp\* gcc\* perl-base file ipv6calc \
rpmquery -a bind-utils libbind \
| xargs -r rpmi -e --
# outstanding binaries
rm -f /sbin/{sln,tc}
rm -f /usr/bin/openssl
:

View File

@@ -107,17 +107,3 @@ rm -rf /lib/modules/*/kernel/net/tipc
rm -rf /lib/modules/*/kernel/net/{wimax,wireless,mac80211}
rm -rf /lib/modules/*/kernel/net/x25
rm -rf /lib/modules/*/kernel/sound
# blacklisted kernel modules
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' /etc/modprobe.d/* |
while read i; do
find /lib/modules/ -type f -name "$i.ko" -delete
done
# regenerate module dependencies
for i in /lib*/modules/*; do
/sbin/depmod -a -F /boot/System.map-${i##*/} ${i##*/}
done
# kernel images
rm -rf /boot/*

View File

@@ -12,11 +12,14 @@ rm -f /usr/lib*/gconv/BIG5*
rm -f /usr/lib*/gconv/EBCDIC*
# en_* variations
rm -rf /usr/{lib*,share}/locale/en_[^U]*
rm -rf /usr/{lib,share}/locale/en_[^U]*
# mods
rm -rf /usr/{lib,share}/locale/*@*
# non-utf8 locales
find /usr/lib*/locale -mindepth 1 -maxdepth 1 -type d \! -name '*.utf8' -print0 |
find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d \! -name '*.utf8' -print0 |
xargs -r0 rm -rf --
# dangling symlinks
find /usr/lib*/locale \! -readable -delete
find /usr/lib/locale \! -readable -delete

View File

@@ -1,6 +1,12 @@
# remove rpm database
rm -rf /var/lib/rpm/*
#!/bin/sh
# dump what's here by this point
echo "** install2 packages before rpmdb purge:"
rpmquery -a --qf='%{NAME} %{VERSION}-%{RELEASE}\n'
# remove apt data files
rm -rf /var/cache/apt /var/lib*/apt
# not going to need them without rpmdb, it's not even rescue anymore
apt-get remove -f -y apt libapt
# remove rpm, apt databases and cache
find /var/lib/rpm /var/lib/apt /var/cache/apt -type f -delete
:

View File

@@ -3,7 +3,10 @@
так и с USB-флэшки.
Можно указать в цепочке зависимостей дистрибутива явно с тем,
чтобы гарантировать гибридный вид образа; в экспериментальном
порядке сделана возможность запросить включение этой фичи при
сборке конфигурации произвольного дистрибутива
чтобы гарантировать гибридный вид образа, либо запросить включение
этой фичи при сборке конфигурации произвольного дистрибутива
(ISOHYBRID=1, см. ../pack/config.mk).
Обратите внимание: в propagator до 20101130-alt15 поддержка
автоматической загрузки с флэш-носителя и при этом ISO-образа
отсутствует, что компенсируется специальной обработкой в gfxboot.

View File

@@ -1,3 +1,4 @@
Эта фича дополняет базовый "живой" образ второй стадии
специфическими для полноценного LiveCD настройками
и скриптовыми хуками.
и скриптовыми хуками, а также создаёт файл index.html
с домашней страницей (редиректором) в корне образа.

View File

@@ -1,16 +1,32 @@
+live: use/live/desktop; @:
# copy stage2 as live
# NB: starts to preconfigure but doesn't use/cleanup yet
use/live: use/stage2 sub/stage2/live
@$(call add_feature)
@$(call add,CLEANUP_PACKAGES,'installer*')
use/live/base: use/live use/syslinux/ui-menu
use/live/base: use/live use/syslinux/ui/menu
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
use/live/x11: use/live/base use/x11/xorg use/x11/wacom use/virtualbox/guest
# optimized out: use/x11/xorg
use/live/desktop: use/live/base use/x11/wacom use/virtualbox/guest \
use/live/sound +power
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
@$(call add,SYSLINUX_CFG,localboot)
# NB: there's an unconditional live/image-scripts.d/40-autologin script
# *but* it only configures some of the *existing* means; let's add one
use/live/autologin: use/live/x11
# for the cases when there should be no display manager
use/live/autologin: use/live use/x11/xorg
@$(call add,LIVE_PACKAGES,autologin xinit)
use/live/hooks: use/live
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
use/live/ru: use/live
@$(call add,LIVE_PACKAGES,livecd-ru)
use/live/sound: use/live
@$(call add,LIVE_PACKAGES,amixer alsa-utils aplay udev-alsa)

View File

@@ -0,0 +1,37 @@
# set up livecd browser redirection page
ifdef BUILDDIR
include $(BUILDDIR)/distcfg.mk
ifndef HOMEPAGE
HOMEPAGE = http://www.altlinux.org/
endif
ifndef HOMENAME
HOMENAME = ALT Linux
endif
ifndef HOMEWAIT
HOMEWAIT = 3
endif
INDEXHTML := $(BUILDDIR)/stage1/files/index.html
all: debug
@if [ -s "$(INDEXHTML)" ]; then \
sed -i \
-e 's,@homepage@,$(HOMEPAGE),' \
-e 's,@homename@,$(HOMENAME),' \
-e 's,@homewait@,$(HOMEWAIT),' \
$(INDEXHTML); \
fi
debug:
@if [ -n "$(DEBUG)" ]; then \
echo "** HOMEPAGE: $(HOMEPAGE)"; \
echo "** HOMENAME: $(HOMENAME)"; \
echo "** HOMEWAIT: $(HOMEWAIT)"; \
fi
endif

View File

@@ -1,4 +1,4 @@
#!/bin/sh -x
#!/bin/sh
# * reset password for root
# * add user `altlinux' (without password)

View File

@@ -1,6 +0,0 @@
#!/bin/sh
# we don't really need the kernel in live root,
# it's been booted already
rm -f /boot/*
:

View File

@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="refresh" content="3;url=http://www.altlinux.org/">
<title>Welcome to ALT Linux!</title>
<meta http-equiv="refresh" content="@homewait@;url=@homepage@">
<title>Welcome to @homename@!</title>
</head>
<body>
<h1>Welcome to ALT Linux!</h1>
<p>You will be redirected to <a href="http://www.altlinux.org/">the home page</a> shortly.</p>
<h1>Welcome to @homename@!</h1>
<p>You will be redirected to <a href="@homepage@">the home page</a> shortly.</p>
</body>
<html>
</html>

View File

@@ -2,4 +2,4 @@
- загрузку бездисковых тонких клиентов по сети;
- предоставление им доступа к серверу приложений.
На данный момент является совсем экспериментальной.
На данный момент является экспериментальной.

View File

@@ -1,3 +1,5 @@
+ltsp: use/ltsp/base; @:
use/ltsp:
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
@$(call add,MAIN_LISTS,ltsp-client ltsp-client.$(ARCH))

View File

@@ -1,3 +1,5 @@
+power: use/power/acpi/button use/power/acpi/cpufreq; @:
# common
# TODO: invent multi-target scripts and integrate that 08-powerbutton
use/power:

View File

@@ -2,8 +2,9 @@
реализуется в рамках stage1.
Цели config.mk:
* use/syslinux/ui-% -- конфигурирование интерфейса (см. cfg.in/00*.cfg);
* use/syslinux/ui/% -- конфигурирование интерфейса (см. cfg.in/00*.cfg);
при использовании автоматически добавляют syslinux в FEATURES;
* use/syslinux/timeout/% -- задание таймаута автозагрузки (в десятых секунды);
* use/syslinux/%.com, use/syslinux/%.c32 -- подключение одноименных модулей
(копирование бинарников и включение кусочков конфигурации; экспериментальное);
* use/syslinux/%.cfg -- подключение кусочков конфигурации.

View File

@@ -0,0 +1,2 @@
timeout @timeout@
totaltimeout 3000

View File

@@ -1,2 +0,0 @@
timeout 200

View File

@@ -2,9 +2,10 @@
use/syslinux: sub/stage1
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,syslinux)
@$(call try,META_SYSTEM_ID,SYSLINUX)
# UI is overwritten
use/syslinux/ui-%: use/syslinux
use/syslinux/ui/%: use/syslinux
@$(call set,SYSLINUX_UI,$*)
@if [ "$*" == gfxboot ]; then \
$(call add,STAGE1_PACKAGES,gfxboot); \
@@ -17,3 +18,6 @@ use/syslinux/%.com use/syslinux/%.c32: use/syslinux
use/syslinux/%.cfg: use/syslinux
@$(call add,SYSLINUX_CFG,$*)
use/syslinux/timeout/%: use/syslinux
@$(call set,SYSLINUX_TIMEOUT,$*)

View File

@@ -1,5 +1,8 @@
ifdef BUILDDIR
# in deciseconds
DEFAULT_TIMEOUT = 90
# prepare data for syslinux installation;
# see also stage1/scripts.d/01-syslinux
@@ -44,15 +47,27 @@ cfg = $(wildcard cfg.in/??$(1).cfg)
# and files involved will appear inside instrumental chroot
#
# arguments get evaluated before recipe body execution thus prep
all: prep debug
@cp -pLt $(DSTDIR) -- $(sort \
$(foreach C,$(SYSLINUX_CFG),$(call cfg,$(C))) \
$(foreach M,$(SYSLINUX_MODULES),$(call cfg,$(M))))
all: debug timeout
@### proper text branding should be implemented
@sed -i 's,@mkimage-profiles@,$(IMAGE_NAME),' $(DSTDIR)/*.cfg
@echo $(SYSLINUX_MODULES) > $(DSTDIR)/modules.list
@echo $(SYSLINUX_FILES) > $(DSTDIR)/syslinux.list
# integerity check
timeout: copy
@if [ "$(SYSLINUX_TIMEOUT)" -ge 0 ] 2>/dev/null; then \
TIMEOUT="$(SYSLINUX_TIMEOUT)"; \
else \
TIMEOUT="$(DEFAULT_TIMEOUT)"; \
fi; \
sed -i "s,@timeout@,$$TIMEOUT," $(DSTDIR)/*.cfg
copy: prep
@cp -pLt $(DSTDIR) -- $(sort \
$(foreach C,$(SYSLINUX_CFG),$(call cfg,$(C))) \
$(foreach M,$(SYSLINUX_MODULES),$(call cfg,$(M))))
prep:
@mkdir -p $(DSTDIR)

View File

@@ -1,4 +1,4 @@
#!/bin/sh -x
#!/bin/sh
# postprocess isolinux configuration
# when the image sizes are finally known

View File

@@ -1 +1,2 @@
Эта фича добавляет базовую поддержку графической системы X11.
Эта фича добавляет базовую поддержку графической системы X11
и комплектует типовые десктопные окружения.

View File

@@ -1,9 +1,24 @@
+icewm: use/x11/icewm; @:
+razorqt: use/x11/razorqt use/x11/lightdm; @:
+tde: use/x11/tde use/x11/kdm; @:
use/x11/xorg:
@$(call add,THE_LISTS,xorg)
@$(call add,THE_KMODULES,drm)
use/x11/wacom: use/x11/xorg
@$(call add,THE_PACKAGES,xorg-drv-wacom)
@$(call add,THE_PACKAGES,xorg-drv-wacom xorg-drv-wizardpen)
use/x11/drm: use/x11/xorg
@$(call add,THE_KMODULES,drm drm-radeon)
use/x11/3d-free: use/x11/drm
@$(call add,THE_KMODULES,drm-nouveau)
### fglrx is broken with xorg-1.12 so far
use/x11/3d-proprietary: use/x11/xorg
@$(call add,THE_KMODULES,fglrx nvidia)
@$(call add,THE_PACKAGES,nvidia-settings nvidia-xconfig)
@$(call add,THE_PACKAGES,fglrx_glx fglrx-tools)
### strictly speaking, runlevel5 should require a *dm, not vice versa
use/x11/runlevel5: use/x11/xorg
@@ -13,9 +28,18 @@ use/x11/runlevel5: use/x11/xorg
use/x11/xdm: use/x11/runlevel5
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole)
use/x11/kdm: use/x11/runlevel5
@$(call add,THE_PACKAGES,kdebase-kdm)
### : some set()-like thing might be better?
use/x11/lightdm: use/x11/runlevel5
@$(call add,THE_PACKAGES,lightdm)
use/x11/kdm: use/x11/runlevel5
@$(call add,THE_PACKAGES,kdebase-kdm)
use/x11/icewm: use/x11/xorg
@$(call add,THE_LISTS,$(call tags,icewm desktop))
use/x11/razorqt: use/x11/xorg
@$(call add,THE_LISTS,$(call tags,razorqt desktop))
use/x11/tde: use/x11/xorg
@$(call add,THE_LISTS,$(call tags,tde desktop))

View File

@@ -61,7 +61,8 @@ imagedir:
postprocess: | $(addprefix postprocess-,$(sort $(POSTPROCESS_TARGETS)))
@OUTPATH="$(IMAGEDIR)/$(IMAGE_OUTFILE)"; \
echo "** image: $$OUTPATH" >&2 && \
OUTSIZE="`ls -lh "$$OUTPATH" | cut -f5 -d' '`"; \
echo "** image: $$OUTPATH [$$OUTSIZE]" >&2 && \
ln -sf "$(IMAGE_OUTFILE)" "$(IMAGEDIR)/$(IMAGE_LINK)" && \
ln -sf "$${IMAGEDIR#`pwd`/}" "$(OUT_LINK)"; \
ln -sf "$(IMAGE_LINK)" $(OUT_LINK)/"$(CURRENT_LINK).$(IMAGE_TYPE)"; \

View File

@@ -1,11 +1,11 @@
Этот каталог копируется из метапрофиля в профиль "как есть"
и формирует "затравку" финальной стадии, собирающей собственно
и формирует "заготовку" финальной стадии, собирающей собственно
образ из результатов работы индивидуальных субпрофилей
(для distro/*) либо непосредственно "на месте" (для ve/*).
Содержимое files/ копируется в корень образа.
Соответственно для сборки требуется или features.in/build-distro,
или use/build-ve.
Соответственно для сборки также потребуется или
../features.in/build-distro, или ../features.in/build-ve.
Пакетная база рабочего чрута минимальна (может чуть расширяться
фичами -- см. ../features.in/repo/lib/build-genbasedir.mk

View File

@@ -10,7 +10,7 @@ PREFS := $(.VARIABLES)
DISTCFG := $(.VARIABLES)
# a separator variable
-- := --
-- = --
.PHONY: dump-vars

View File

@@ -31,8 +31,10 @@ IMAGEDIR ?= $(shell \
)
# actual build starter
# NB: our output MUST go into stderr to escape POSTPROC
build-image: profile/populate
@if [ -n "$(CHECK)" ]; then \
@{ \
if [ -n "$(CHECK)" ]; then \
echo "$(TIME) skipping actual image build (CHECK is set)"; \
exit; \
fi; \
@@ -61,4 +63,5 @@ build-image: profile/populate
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
fi; \
if [ -n "$(BELL)" ]; then echo -ne '\a' >&2; fi
if [ -n "$(BELL)" ]; then echo -ne '\a'; fi; \
} >&2

View File

@@ -19,19 +19,23 @@ endif
endif
# ordinary clean: destroys workdirs but not the corresponding results
# NB: our output MUST go into stderr to escape POSTPROC
clean:
@find -name '*~' -delete >&/dev/null ||:
@if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
@{ \
find -name '*~' -delete >&/dev/null ||:; \
if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
echo "$(TIME) cleaning up $(WARNING)"; \
$(MAKE) -C "$(SYMLINK)" $@ \
GLOBAL_BUILDDIR="$(realpath $(SYMLINK))" $(LOG) ||:; \
fi
fi; \
} >&2
# there can be some sense in writing log here even if normally
# $(BUILDDIR)/ gets purged: make might have failed,
# and BUILDLOG can be specified by hand either
distclean: clean
@if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
@{ \
if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
build="$(realpath $(SYMLINK)/)"; \
if [ "$$build" = / ]; then \
echo "** ERROR: invalid \`"$(SYMLINK)"' symlink" >&2; \
@@ -41,16 +45,19 @@ distclean: clean
GLOBAL_BUILDDIR="$$build" $(LOG) ||: \
rm -rf "$$build"; \
fi; \
fi
@rm -f "$(SYMLINK)"
fi; \
rm -f "$(SYMLINK)"; \
} >&2
# builddir existing outside read-only metaprofile is less ephemeral
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
postclean: build-image
@if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
@{ \
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
echo "$(TIME) cleaning up after build"; \
$(MAKE) -C "$(BUILDDIR)" distclean \
GLOBAL_BUILDDIR="$(BUILDDIR)" $(LOG) ||:; \
rm -rf "$(BUILDDIR)"; \
fi
fi; \
} >&2

View File

@@ -11,17 +11,23 @@ sub/%:
@$(call add,SUBPROFILES,$(@:sub/%=%))
# install media bootloader
boot/%: use/syslinux
boot/%:
@$(call set,BOOTLOADER,$*)
# fundamental targets
distro/.init: profile/bare
@$(call try,META_PREPARER,mkimage-profiles)
@$(call try,META_APP_ID,$(IMAGE_NAME))
@$(call set,META_PUBLISHER,ALT Linux Team)
# NB: the last flavour in KFLAVOURS gets to be the default one;
# the kernel packages regexp evaluation has to take place at build stage
distro/.base: distro/.init
@$(call set,KFLAVOURS,std-def)
@$(call set,META_SYSTEM_ID,LINUX)
@$(call set,META_VOL_ID,ALT Linux $(ARCH))
@$(call set,META_VOL_SET,ALT Linux)
# something marginally useful (as a network-only installer)
# NB: doesn't carry stage3 thus cannot use/bootloader
@@ -29,6 +35,6 @@ distro/installer: distro/.base use/install2 use/syslinux/localboot.cfg
@$(call set,INSTALLER,altlinux-generic)
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS
distro/.installer: distro/installer use/bootloader/grub use/repo/main
distro/.installer: distro/installer use/bootloader/grub use/repo/main; @:
endif

12
lib/help.mk Normal file
View File

@@ -0,0 +1,12 @@
# this makefile holds the most helpful bits for the toplevel one
help/distro:
@echo '** available distribution targets:'; \
bin/columnize $(sort $(DISTROS:distro/%=%))
help/ve:
@echo '** available virtual environment targets:'; \
bin/columnize $(sort $(VES))
help: | help/distro help/space help/ve; @:
help/space:; @echo

View File

@@ -15,7 +15,7 @@ if [ -s "$(SYMLINK)" -a "$(NUM_TARGETS)" = 1 ] && \
then \
echo "$(BUILDLINK)"; \
else \
bin/mktmpdir $(BUILDDIR_PREFIX) || exit 127; \
bin/mktmpdir $(BUILDDIR_PREFIX) || exit 200; \
fi; )
endif
@@ -34,50 +34,57 @@ CONFIG := $(BUILDDIR)/distcfg.mk
RC := $(HOME)/.mkimage/profiles.mk
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
# NB: our output MUST go into stderr to escape POSTPROC
profile/init: distclean
@if [ "`realpath "$(BUILDDIR)/"`" = / ]; then \
@{ \
if [ "`realpath "$(BUILDDIR)/"`" = / ]; then \
echo "$(TIME) ERROR: invalid BUILDDIR: \`$(BUILDDIR)'"; \
exit 128; \
fi;
@echo -n "$(TIME) initializing BUILDDIR: "
@rsync -qaxH --delete-after image.in/ "$(BUILDDIR)"/
@mkdir "$(BUILDDIR)"/.mki # mkimage toplevel marker
fi; \
echo -n "$(TIME) initializing BUILDDIR: "; \
rsync -qaxH --delete-after image.in/ "$(BUILDDIR)"/; \
mkdir "$(BUILDDIR)"/.mki; \
} >&2
@$(call put,ifndef DISTCFG_MK)
@$(call put,DISTCFG_MK = 1)
@if type -t git >&/dev/null; then \
@{ \
if type -t git >&/dev/null; then \
if [ -d .git ]; then \
git show-ref --head -d -s -- HEAD && \
git status -s && \
echo; \
fi $(LOG); \
fi
@{ \
fi; \
{ \
eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \
SOURCELIST Dir::Etc::sourcelist/f \
SOURCEPARTS Dir::Etc::sourceparts/d`; \
find "$$SOURCEPARTS" -name '*.list' \
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \
echo; \
} $(LOG)
@if type -t git >&/dev/null; then \
} $(LOG); \
if type -t git >&/dev/null; then \
if cd $(BUILDDIR); then \
git init -q && \
git add . && \
git commit -qam 'derivative profile initialized'; \
cd ->&/dev/null; \
fi; \
fi
@if [ -w . ]; then \
fi; \
if [ -w . ]; then \
rm -f "$(SYMLINK)" && \
ln -s "$(BUILDDIR)" "$(SYMLINK)" && \
echo "$(SYMLINK)/"; \
else \
echo "$(BUILDDIR)/" $(SHORTEN); \
fi $(SHORTEN)
echo "$(BUILDDIR)/"; \
fi $(SHORTEN); \
} >&2
profile/bare: profile/init
@NOTE="$${GLOBAL_VERBOSE:+: $(CONFIG)}"; \
echo "$(TIME) preparing distro config$$NOTE" \
$(SHORTEN)
@{ \
NOTE="$${GLOBAL_VERBOSE:+: $(CONFIG)}"; \
echo "$(TIME) preparing distro config$$NOTE" $(SHORTEN); \
} >&2
@$(call try,MKIMAGE_PREFIX,/usr/share/mkimage)
@$(call try,GLOBAL_VERBOSE,)
@$(call try,IMAGEDIR,$(IMAGEDIR))
@@ -106,7 +113,7 @@ profile/dump-vars:
fi $(LOG)
# step 3 entry point: copy the needed parts into BUILDDIR
profile/populate: profile/init profile/finalize profile/dump-vars
profile/populate: profile/finalize profile/dump-vars
@for dir in sub.in features.in pkg.in; do \
$(MAKE) -C $$dir $(LOG); \
done

9
lib/report.mk Normal file
View File

@@ -0,0 +1,9 @@
# enable make target tracing
ifdef REPORT
TRACE_PREFIX := trace:building
OLD_SHELL := $(SHELL)
SHELL = $(info $(TRACE_PREFIX) $@$(if $^$|, -> $^ $|))$(OLD_SHELL)
# piggyback BUILDDIR back into supervising environment
$(info $(TRACE_PREFIX) BUILDDIR = $(BUILDDIR))
endif

View File

@@ -15,4 +15,4 @@ config/name/%:
@$(call set,IMAGE_NAME,$*)
# the final thing will pull the rest in
build: postclean
build: postclean; @:

View File

@@ -13,6 +13,7 @@ ve/bare: ve/.bare
@$(call add,BASE_PACKAGES,apt)
ve/generic: ve/.bare
@$(call add,BASE_PACKAGES,openssh-server openssh-blacklist openssh-clients)
@$(call add,BASE_LISTS,\
$(call tags,base && (server || network || security || pkg)))

13
main.mk
View File

@@ -45,17 +45,6 @@ IMAGES := $(DISTROS) $(VES)
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
.PHONY: debug everything help space
distro/help:
@echo '** available distribution targets:'
@echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
ve/help:
@echo '** available virtual environment targets:'
@echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
help: | distro/help space ve/help
space:; @echo
### duplicate but still needed
everything:
@n=1; sum=$(words $(DISTROS)); \
@@ -75,7 +64,7 @@ $(IMAGES): debug \
build; @:
# convenience shortcut
$(DISTROS:distro/%=%): %: distro/%
$(DISTROS:distro/%=%): %: distro/%; @:
debug:
ifeq (2,$(DEBUG))

View File

@@ -25,13 +25,12 @@ all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
cd - >&/dev/null; \
fi
# env | sort -u | grep _LISTS | xargs cp
copy-lists:
@# env | sort -u | grep _LISTS | xargs cp
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell cp --parents -at $(TARGET) \
-- $(value $V))))
@cp --parents -at $(TARGET) -- \
$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),$($V)))
copy-groups:
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
@@ -63,4 +62,5 @@ debug:
@echo -e $(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell echo '\\n"**"' $V: $(value $V)))) '\n'
$(shell echo '\\n"**"' $V: $($V)))) '\n'

View File

@@ -6,5 +6,5 @@
см. http://www.altlinux.org/Alterator-pkg); он создаётся из
содержимого ряда переменных (см. Makefile).
Подкаталог tagged/ стоит рассматривать как экспериментальный,
но находящий всё более широкое практическое использование.
Подкаталог tagged/ содержит тегированные списки, имена которых
удобно получать функцией tags() (см. ../../lib/functions.mk).

View File

@@ -1,12 +1,12 @@
Этот каталог содержит тегированные списки; на данный момент
реализация (tags2lists) требует, чтобы каждый из тегов был
отдельным словом, состоящим из символов из набора a-zA-Z0-9_
(внимание: не используйте в слове "-"); рекомендуется
реализация (../../../bin/tags2lists) требует, чтобы каждый
из тегов был отдельным словом, состоящим из символов из набора
a-zA-Z0-9_ (внимание: не используйте в слове "-"); рекомендуется
разделять слова "+".
Предположительное применение: дополнение функциональности,
заданной статически (наследственно или явно), факультативным
результатом раскрытия списка тегов; в первую очередь contrib?
Применение: дополнение жёстко статически заданной функциональности
более "плавающим" в долгосрочном плане результатом раскрытия
списка тегов.
Реализация является экспериментальной и требует утряски
с ../groups/; комментарии и помощь всячески приветствуются.

View File

@@ -0,0 +1 @@
aptitude

View File

@@ -9,6 +9,8 @@ mailx
netcat
netlist
openssh-clients
openssh-server
openssh-blacklist
rsync
traceroute
vlan-utils

View File

@@ -0,0 +1,9 @@
#wm-select
# for those who need these
xorg-drv-keyboard
xorg-drv-mouse
#xorg-extensions*
# :-/
#*-debuginfo-

View File

@@ -9,40 +9,22 @@ xorg-drv-mga
xorg-drv-multimedia
xorg-drv-nouveau
xorg-drv-nv
#I586_ONLY@xorg-drv-s3
#I586_ONLY@xorg-drv-s3virge
#I586_ONLY@xorg-drv-savage
xorg-drv-s3
xorg-drv-s3virge
xorg-drv-savage
xorg-drv-sis
xorg-drv-synaptics
xorg-drv-vesa
xorg-drv-video
xorg-drv-void
xorg-drv-wacom
xorg-drv-wizardpen
xorg-drv-qxl
# #25044?
#25044?
xorg-dri-intel
# for those who need these
xorg-drv-keyboard
xorg-drv-mouse
xauth
xorg-utils
#xorg-extensions*
xinit
# TODO: split these into a separate packagelist or no sense?
#wm-select
fonts-ttf-dejavu
fonts-bitmap-terminus
fonts-otf-stix
fonts-ttf-droid
x-cursor-theme-jimmac
menu-icons-default
# :-/
#*-debuginfo-

14
reports.mk Normal file
View File

@@ -0,0 +1,14 @@
# collect what's left
all: reports/targets
reports/targets:
@if [ -n "$$REPORT_PATH" -a -s "$$REPORT_PATH" ]; then \
BUILDDIR="`sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' \
"$$REPORT_PATH"`"; \
REPORT_IMAGE="$$BUILDDIR/targets.png"; \
bin/report-targets < "$$REPORT_PATH" \
| dot -Tpng -o "$$REPORT_IMAGE" \
&& echo "** target graph report: $$REPORT_IMAGE" \
&& mv "$$REPORT_PATH" "$$BUILDDIR/targets.log"; \
fi

View File

@@ -12,6 +12,6 @@
рабочий чрут не содержит исполняемых файлов.
Не следует использовать этот субпрофиль напрямую, для добавления
пакетного репозитория в образ предназначена фича repo/main.
пакетного репозитория в образ предназначена фича use/repo/main.
Результат -- каталог ALTLinux/RPMS.main для копирования в образ.

View File

@@ -14,7 +14,7 @@ cd /usr/share/X11/locale && rm -rf ja* ko* th* vi* zh*
cd /usr/share/X11/xkb/symbols && rm -rf jp kr th vn cn
# locales
cd /usr/lib*/locale && rm -rf ja_* ko_* th_* zh_*
cd /usr/lib/locale && rm -rf ja_* ko_* th_* zh_*
# gconv
cd /usr/lib*/gconv && rm -f JIS* T*

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# outstanding binaries
rm -f /sbin/{sash,sln,tc}
rm -f /usr/bin/{openssl,ipv6log*}
rm -f /bin/ipv6calc

View File

@@ -0,0 +1,5 @@
#!/bin/sh
# no sense in xorg-dri-* without kernel-modules-drm*
stat /lib/modules/*/kernel/drivers/gpu/drm >&/dev/null \
|| rm -rf /usr/lib*/X11/modules/dri/

View File

@@ -0,0 +1,7 @@
#!/bin/sh
# blacklisted kernel modules
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' /etc/modprobe.d/* |
while read i; do
find /lib/modules/ -type f -name "$i.ko" -delete
done

View File

@@ -0,0 +1,8 @@
#!/bin/sh
# regenerate module dependencies after pruning kernel modules
# (this script must run after anything touching /lib/modules)
cd /lib/modules
for i in *.*; do
depmod -a -F /boot/System.map-$i $i
done

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# no need for the kernel in live root
# (unless it's a live-install):
# it's been booted already
[ -x /usr/sbin/live-install ] || rm -f /boot/*