ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] RFC: test-rootfs
@ 2005-06-14  9:46 Alexey Tourbin
  2005-06-14 11:33 ` [devel] " Michael Shigorin
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alexey Tourbin @ 2005-06-14  9:46 UTC (permalink / raw)
  To: devel


[-- Attachment #1.1: Type: text/plain, Size: 3819 bytes --]

Здравствуйте.

Суть вопроса вот в чем:
Test that binaries in /bin and /sbin depend only on libraries in /lib.
Иными словами, система без смонтированного /usr должна быть замкнутой.

Для тестирования предлагается сделать отдельный пакет.  См.
test-rootfs.spec (attached).  Этот specfile будет обновляться
в полуавтоматическом режиме.

Обнаруженные нарушители конвенции приведены ниже.  Что бы с ними
сделать?  Развесить block-баги?

Error: /bin/rpm depends on /usr/lib/librpm-4.0.4.so
lrwxrwxrwx  1 rooter rooter 14 Jun 14 13:13 /bin/rpm -> ../usr/bin/rpm

Error: /bin/rpm depends on /usr/lib/librpmbuild-4.0.4.so
lrwxrwxrwx  1 rooter rooter 14 Jun 14 13:13 /bin/rpm -> ../usr/bin/rpm

Error: /bin/rpm depends on /usr/lib/librpmdb-4.0.4.so
lrwxrwxrwx  1 rooter rooter 14 Jun 14 13:13 /bin/rpm -> ../usr/bin/rpm

Error: /bin/rpm depends on /usr/lib/librpmio-4.0.4.so
lrwxrwxrwx  1 rooter rooter 14 Jun 14 13:13 /bin/rpm -> ../usr/bin/rpm

Error: /bin/rpm depends on /usr/lib/libbeecrypt.so.2
lrwxrwxrwx  1 rooter rooter 14 Jun 14 13:13 /bin/rpm -> ../usr/bin/rpm

Error: /bin/asfxload depends on /usr/lib/libawe.so.5
-rwxr-xr-x  1 rooter rooter 9976 Nov 11  2004 /bin/asfxload

Error: /bin/asfxload depends on /usr/lib/libasound.so.2
-rwxr-xr-x  1 rooter rooter 9976 Nov 11  2004 /bin/asfxload

Error: /bin/gusload depends on /usr/lib/libawe.so.5
-rwxr-xr-x  1 rooter rooter 11516 Nov 11  2004 /bin/gusload

Error: /bin/gusload depends on /usr/lib/libasound.so.2
-rwxr-xr-x  1 rooter rooter 11516 Nov 11  2004 /bin/gusload

Error: /bin/sfxload depends on /usr/lib/libawe.so.5
-rwxr-xr-x  1 rooter rooter 10284 Nov 11  2004 /bin/sfxload

Error: /bin/sfxload depends on /usr/lib/libasound.so.2
-rwxr-xr-x  1 rooter rooter 10284 Nov 11  2004 /bin/sfxload

Error: /sbin/install-info depends on /usr/lib/libzio.so.0
-rwxr-xr-x  1 rooter rooter 23324 Jun 14 13:13 /sbin/install-info

Error: /sbin/circleping depends on /usr/lib/libmagma.so.DEVEL
-rwxr-xr-x  1 rooter rooter 7464 Mar 31 19:42 /sbin/circleping

Error: /sbin/circleping depends on /usr/lib/libmagmamsg.so.DEVEL
-rwxr-xr-x  1 rooter rooter 7464 Mar 31 19:42 /sbin/circleping

Error: /sbin/cluster_cmd depends on /usr/lib/libmagma.so.DEVEL
-rwxr-xr-x  1 rooter rooter 10736 Mar 31 19:42 /sbin/cluster_cmd

Error: /sbin/cluster_cmd depends on /usr/lib/libmagmamsg.so.DEVEL
-rwxr-xr-x  1 rooter rooter 10736 Mar 31 19:42 /sbin/cluster_cmd

Error: /sbin/magma_tool depends on /usr/lib/libmagma.so.DEVEL
-rwxr-xr-x  1 rooter rooter 11588 Mar 31 19:42 /sbin/magma_tool

Error: /sbin/magma_tool depends on /usr/lib/libmagmamsg.so.DEVEL
-rwxr-xr-x  1 rooter rooter 11588 Mar 31 19:42 /sbin/magma_tool

Error: /sbin/ifplugd depends on /usr/lib/libdaemon.so.0
-rwxr-xr-x  1 rooter rooter 23452 Jan  4 19:01 /sbin/ifplugd

Error: /sbin/ifplugstatus depends on /usr/lib/libdaemon.so.0
-rwxr-xr-x  1 rooter rooter 10184 Jan  4 19:01 /sbin/ifplugstatus

Error: /sbin/syslog-ng depends on /usr/lib/libol.so.0
-rwxr-xr-x  1 rooter rooter 81256 Apr 13  2004 /sbin/syslog-ng

Error: /sbin/scsi_id depends on /usr/lib/libsysfs.so.1
-rwxr-xr-x  1 rooter rooter 14520 Mar 31 19:57 /sbin/scsi_id

Error: /sbin/udev depends on /usr/lib/libsysfs.so.1
-rwxr-xr-x  1 rooter rooter 30488 Mar 31 19:57 /sbin/udev

Error: /sbin/udev_volume_id depends on /usr/lib/libsysfs.so.1
-rwxr-xr-x  1 rooter rooter 16840 Mar 31 19:57 /sbin/udev_volume_id

Error: /sbin/udevd depends on /usr/lib/libsysfs.so.1
-rwxr-xr-x  1 rooter rooter 7372 Mar 31 19:57 /sbin/udevd

Error: /sbin/udevsend depends on /usr/lib/libsysfs.so.1
-rwxr-xr-x  1 rooter rooter 5624 Mar 31 19:57 /sbin/udevsend

Error: /sbin/udevstart depends on /usr/lib/libsysfs.so.1
lrwxrwxrwx  1 rooter rooter 4 Jun 14 13:15 /sbin/udevstart -> udev

[-- Attachment #1.2: test-rootfs.spec --]
[-- Type: text/plain, Size: 5770 bytes --]

Name: test-rootfs
Version: 20050614
Release: alt1

Summary: test root filesystem
License: GPL
Group: File tools

# error: unpacking of archive failed on file /dev/MAKEDEV;42ae9a90: cpio: symlink failed - Permission denied
#uildRequires(build): MAKEDEV
BuildRequires(build): SysVinit
BuildRequires(build): acct
BuildRequires(build): acl
BuildRequires(build): agetty
BuildRequires(build): apcupsd
BuildRequires(build): ash
BuildRequires(build): ash-static
BuildRequires(build): aumix-minimal
BuildRequires(build): awesfx
BuildRequires(build): bash
BuildRequires(build): bootsplash
BuildRequires(build): bridge-utils
BuildRequires(build): bzip2
BuildRequires(build): bzlib
BuildRequires(build): captive-lufs
# ccs: Depends: /etc/sysconfig/cluster but it is not installable
#uildRequires(build): ccs
BuildRequires(build): chkconfig
# cman: Depends: /etc/sysconfig/cluster but it is not installable
#uildRequires(build): cman
# console-tools: Conflicts: console-tools_or_kbd (> console-tools0:0.2.3-ipl31mdk)
#uildRequires(build): console-tools
BuildRequires(build): coreutils
BuildRequires(build): cpio
BuildRequires(build): cpuid
BuildRequires(build): cpuspeed
BuildRequires(build): dhcp-client
BuildRequires(build): dhcpcd
BuildRequires(build): dosfstools
BuildRequires(build): dump
BuildRequires(build): e2fsprogs
BuildRequires(build): ed
BuildRequires(build): evms
BuildRequires(build): evms-cli
BuildRequires(build): fbgetty
BuildRequires(build): fdisk
BuildRequires(build): fence
BuildRequires(build): findutils
# fuse-siefs: Depends: fuse (= 2.2-alt6)
#uildRequires(build): fuse-siefs
BuildRequires(build): gawk
BuildRequires(build): genromfs
BuildRequires(build): getopt
BuildRequires(build): glibc-core
BuildRequires(build): glibc-utils
BuildRequires(build): gnbd
BuildRequires(build): gpart
BuildRequires(build): grep
# gulm: Depends: /etc/sysconfig/cluster but it is not installable
#uildRequires(build): gulm
BuildRequires(build): gzip
BuildRequires(build): hashalot
BuildRequires(build): hdparm
BuildRequires(build): hotplug
BuildRequires(build): hwclock
BuildRequires(build): ifplugd
BuildRequires(build): ifrename
BuildRequires(build): info-install
BuildRequires(build): ipchains
BuildRequires(build): iproute2
BuildRequires(build): iptables
BuildRequires(build): iptables-ipv6
BuildRequires(build): iputils
BuildRequires(build): ipv6calc
BuildRequires(build): ipxutils
BuildRequires(build): ircd
BuildRequires(build): isapnptools
BuildRequires(build): isdn4k-utils
BuildRequires(build): jfsprogs
# kbd: Conflicts: console-tools_or_kbd (< kbd0:1.12-alt2)
#uildRequires(build): kbd
BuildRequires(build): kbdrate
BuildRequires(build): klogd
BuildRequires(build): lcap
BuildRequires(build): libcap-utils
BuildRequires(build): lilo
BuildRequires(build): login
BuildRequires(build): losetup
BuildRequires(build): lufs
BuildRequires(build): magma
BuildRequires(build): mailx
BuildRequires(build): mdadm
BuildRequires(build): mgetty
BuildRequires(build): mgetty-voice
BuildRequires(build): mingetty
BuildRequires(build): mkinitrd
BuildRequires(build): mktemp
BuildRequires(build): modutils
BuildRequires(build): mount
BuildRequires(build): msulogin
BuildRequires(build): mt-st
BuildRequires(build): ncpfs
BuildRequires(build): net-scripts
BuildRequires(build): net-tools
BuildRequires(build): nfs-clients
# nut-driver: PreDepends: nut (= 2.0.1-alt2) but it is not going to be installed
#uildRequires(build): nut-driver
BuildRequires(build): pam
BuildRequires(build): pam0_console
BuildRequires(build): pam0_timestamp
BuildRequires(build): pcmcia-cs
BuildRequires(build): pdksh
BuildRequires(build): portmap
BuildRequires(build): procps
BuildRequires(build): psmisc
BuildRequires(build): quota
BuildRequires(build): raidtools
BuildRequires(build): reiser4progs
BuildRequires(build): reiserfsprogs
BuildRequires(build): rmt
BuildRequires(build): rpm
BuildRequires(build): samba-client
BuildRequires(build): sash
BuildRequires(build): sed
BuildRequires(build): service
BuildRequires(build): setserial
BuildRequires(build): sfdisk
BuildRequires(build): sh
BuildRequires(build): squashfsprogs
BuildRequires(build): su
BuildRequires(build): submount
BuildRequires(build): submount24
BuildRequires(build): syslog-common
BuildRequires(build): syslog-ng
BuildRequires(build): syslogd
BuildRequires(build): tar
BuildRequires(build): tcb-utils
BuildRequires(build): tcsh
BuildRequires(build): termutils
BuildRequires(build): traceroute
BuildRequires(build): udev
BuildRequires(build): util-linux
BuildRequires(build): vim-minimal
BuildRequires(build): vitmp
BuildRequires(build): wireless-tools
BuildRequires(build): xfsdump
BuildRequires(build): xfsprogs
BuildRequires(build): zcip
BuildRequires(build): zsh

%description
: Test that binaries in /bin and /sbin depend only on libraries in /lib.
: This is how the above list was formed:
cd Sisyphus/files/i586/RPMS
for f in *.rpm ; do if rpm -qpl $f |grep -E '^/s?bin/'; then rpm -qp --qf '%{NAME}\n' $f; fi; done

%build
set +x
RC=0
for f in `find /bin /sbin`; do
	[ -f "$f" ] || { echo "test-rootfs: $f not a file"; continue; }
	[ -r "$f" ] || { echo "test-rootfs: $f not readable"; continue; }
	type="$(file -bL "$f")"
	[ -z "${type%%ELF *}" -a -z "${type##*(uses shared libs)*}" ] || { 
		echo "test-rootfs: $f type $type"; continue; }
	echo "$f"
	ldd="$(ldd "$f")"
	libs="$(echo "$ldd" |awk '{print$3}')"
	for lib in $libs; do
		[ -z "${lib%%/lib*/*}" ] || {
			echo "Error: $f depends on $lib"
			ls -l "$f"; RC=1; }
	done
done
exit $RC

%files

%changelog
* Tue Jun 14 2005 Alexey Tourbin <at@altlinux.ru> 20050614-alt1
- initial revision

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-06-18 15:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-14  9:46 [devel] RFC: test-rootfs Alexey Tourbin
2005-06-14 11:33 ` [devel] " Michael Shigorin
2005-06-14 12:01 ` Alexey Tourbin
2005-06-14 12:43   ` [devel] bugzilla mail interface Michael Shigorin
2005-06-14 23:55     ` [devel] " Alexey Tourbin
2005-06-15  0:00 ` [devel] Re: RFC: test-rootfs Alexey Tourbin
2005-06-15  6:47   ` [devel] ~/bin/altbug (was: RFC: test-rootfs) Michael Shigorin
2005-06-15  8:21     ` [devel] " Alexey Tourbin
2005-06-17 18:02     ` Alexey Tourbin
2005-06-18 15:07       ` Eugene Vlasov
2005-06-15  7:26   ` [devel] Re: RFC: test-rootfs Vitaly Lipatov
2005-06-15  8:21     ` Alexey Tourbin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git