Compare commits

...

8 Commits

Author SHA1 Message Date
Michael Shigorin
1af5812a09 1.0.6-alt0.M70T.1
- mktmpdir: fixed sort key
2015-09-07 23:56:39 +03:00
Michael Shigorin
f187645ba4 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:46 +03:00
Michael Shigorin
140b89c211 tar2vm: fixed broken sfdisk use
Yet another age old bug: `sfdisk -l' is mimicking what
a person does by hand but the script is rather interested
in what `sfdisk -g' provides, that is, geometry.

And it's stupid enough to only grok C locale.
2015-09-07 23:45:21 +03:00
Michael Shigorin
305e7e8fde gear-store-tags 2015-02-02 23:45:15 +03:00
Michael Shigorin
bc2789e9d6 1.0.5-alt0.M70T.1
- backported pkg/lists fix (and the commit before it)
2015-02-02 23:44:32 +03:00
Michael Shigorin
ba84ab0ae3 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:41:45 +03:00
Michael Shigorin
0e31d305ae 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:41:29 +03:00
Michael Shigorin
c601706517 gear-store-tags 2014-03-17 20:39:06 +04:00
7 changed files with 24 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
Name: mkimage-profiles
Version: 1.0.4
Version: 1.0.6
Release: alt0.M70T.1
Summary: ALT Linux based distribution metaprofile
@@ -78,6 +78,12 @@ cp -a * %buildroot%mpdir
%doc %docs/*
%changelog
* Mon Sep 07 2015 Michael Shigorin <mike@altlinux.org> 1.0.6-alt0.M70T.1
- mktmpdir: fixed sort key
* Mon Feb 02 2015 Michael Shigorin <mike@altlinux.org> 1.0.5-alt0.M70T.1
- backported pkg/lists fix (and the commit before it)
* Mon Mar 17 2014 Michael Shigorin <mike@altlinux.org> 1.0.4-alt0.M70T.1
- kernel: don't insist on k-m-r8168

View File

@@ -0,0 +1,6 @@
object bc2789e9d6f4c23270b5ac7f9f31c257620259a1
type commit
tag v1.0.5
tagger Michael Shigorin <mike@altlinux.org> 1422909897 +0300
lists fix backported

View File

@@ -1,6 +0,0 @@
object ee09a917e86302594b3611bdc196af8aa8121094
type commit
tag v1.0.3
tagger Michael Shigorin <mike@altlinux.org> 1393863286 +0400
vm fixes

View File

@@ -1 +1 @@
ccc5ff5be43f0e54ed18fa6f39bc97e72483b681 v1.0.3
4817a708672e35513e7c25a38d8646a61ed10179 v1.0.5

View File

@@ -45,7 +45,7 @@ choose_tmpdir() {
echo -n "$i "
df -PT "$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

View File

@@ -3,6 +3,7 @@
# tar2vm chroot.tar image.raw [size_in_bytes]
. shell-error
export LANG=C
if [ $# -lt 2 ]; then
fatal "error: tar2vm needs at least two arguments"
@@ -109,8 +110,8 @@ chroot "$ROOTFS" make-initrd -k "$KERNEL"
sed -i "s,$LOOPDEV1,$ROOTDEV," "$ROOTFS/etc/fstab"
# configure and install bootloader
REGEXP='^Disk .*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
set -- $(sfdisk -l "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")
REGEXP='^.*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
set -- $(sfdisk -g "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")
LILO_COMMON="lba32
delay=1

View File

@@ -21,13 +21,12 @@ TARGET := $(BUILDDIR)/$(SUFFIX)
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
# 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 \
@@ -43,6 +42,6 @@ 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'
endif