Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37888837
en ru br
Репозитории ALT

Группа :: Система/Настройка/Загрузка и инициализация
Пакет: initrddiff

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

pax_global_header00006660000000000000000000000064117245574240014525gustar00rootroot0000000000000052 comment=48cbf0ac9e930e55820ad9eba5f55d925edb45c6
initrddiff-0.01/000075500000000000000000000000001172455742400135655ustar00rootroot00000000000000initrddiff-0.01/.gear/000075500000000000000000000000001172455742400145615ustar00rootroot00000000000000initrddiff-0.01/.gear/rules000064400000000000000000000000071172455742400156330ustar00rootroot00000000000000tar: .
initrddiff-0.01/initrddiff000075500000000000000000000022471172455742400156420ustar00rootroot00000000000000#!/bin/sh -efu

# initrddiff
# Perform a diff on the files contained within different initrd
# images and show the result.

# Usage: initrddiff [diffoptions] <from_image> <to_image>
#
# diffoptions:
# Most of the single letter options allowable by GNU diff(1) are acceptable.
# By default -NrU0 is used. If providing a value don't forget the -r option.
#
# License: GPL

. shell-error

[ -z "${DEBUG-}" ] || set -x

decompress() {
local cmd='cat' typ=
typ="$(file -b "$1")"
case "$typ" in
'bzip2 compressed data'*) cmd='bunzip -c' ;;
'gzip compressed data'*) cmd='gunzip -c' ;;
'xz compressed data'*) cmd='unxz -c' ;;
esac
$cmd "$1"
}

extract() {
decompress "$1" |
cpio -t |
sed -e "s,lib/modules/[^/]\+,lib/modules/<version>," |
sort
}

diffopts=
while [ "$#" -gt 2 ]; do
diffopts="$diffopts $1"
shift
done

if [ $# != 2 ]; then
printf '%s\n' "Usage: $PROG [diffoptions] <from-image> <to-image>"
exit
fi

for f; do
[ -f "$f" ] ||
fatal "No such file or directory"
done

exec 3<<EOF
`extract "$1"`
EOF
exec 4<<EOF
`extract "$2"`
EOF

diff ${diffopts:--NrU0} /dev/fd/3 /dev/fd/4 |
sed \
-e "s,/dev/fd/3,${1##*/}," \
-e "s,/dev/fd/4,${2##*/},"
initrddiff-0.01/initrddiff.spec000064400000000000000000000012501172455742400165610ustar00rootroot00000000000000Name: initrddiff
Version: 0.01
Release: alt2

Summary: Print diff between two initrd images
License: GPLv3+
Group: System/Configuration/Boot and Init
URL: http://git.altlinux.org/people/evg/packages/initrddiff.git

BuildArch: noarch

Packager: Evgenii Terechkov <evg@altlinux.org>

Source0: %name-%version.tar

%description
Print diff between two initrd images
%prep
%setup

%install
mkdir -p %buildroot/sbin
install -p -m755 %name %buildroot/sbin/

%files
/sbin/%name

%changelog
* Sun Mar 4 2012 Terechkov Evgenii <evg@altlinux.org> 0.01-alt2
- Major rewrite from legion@

* Sat Mar 3 2012 Terechkov Evgenii <evg@altlinux.org> 0.01-alt1
- Initial build for ALT Linux Sisyphus
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin