* [devel] sisyphus_check: check-subdirs
@ 2008-05-04 18:03 Alexey Tourbin
2008-05-04 18:17 ` Michael Shigorin
2008-05-04 18:58 ` Alexey Tourbin
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Tourbin @ 2008-05-04 18:03 UTC (permalink / raw)
To: devel
[-- Attachment #1.1: Type: text/plain, Size: 3060 bytes --]
Я реализовал новую проверку на владение подкаталогами.
Эта проверка требует, что если какой-то каталог /A
запакован в пакет, то и все подкаталоги в иерархии /A/**/*
тоже должны быть запакованы в этот пакет.
Пример:
%files
%dir /A
/A/B/C/D
Ошибка -- также должны быть запакованы подкаталоги /A/B
и /A/B/C, потому что они являются промежуточными компонентами
пути /A/B/C/D.
commit a139ba3bb19c1651b2c52bab8b237fe73b4e0b4f
Author: Alexey Tourbin <at@altlinux.ru>
Date: Sun May 4 20:46:17 2008 +0400
check-subdirs: new check for unpackaged directories
diff --git a/sisyphus_check/sisyphus_check.d/170-check-subdirs b/sisyphus_check/sisyphus_check.d/170-check-subdirs
new file mode 100644
index 0000000..522978b
--- /dev/null
+++ b/sisyphus_check/sisyphus_check.d/170-check-subdirs
@@ -0,0 +1,72 @@
+#!/bin/sh -efu
+#
+# Check that directory packaging is hierarchically consistent.
+#
+# E.g. consider this %files section:
+# %dir /A
+# /A/B/C/D
+# Now we require that directories "/A/B" and "/A/B/C" are also packaged.
+#
+# Copyright (C) 2008 Alexey Tourbin <at@altlinux.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+find_unpackaged_subdirs()
+{
+ [ -n "${rpm_filelist?}" ] || return 0
+ printf '%s\n' "$rpm_filelist" |awk '
+ /^\// {
+ OWN[$0] = 1
+ }
+ function check_path(path) {
+ # "/A/B/C/D" -> ["","A","B","C","D"]
+ n = split(path, comp, "/")
+ # find shortest prefix which is owned by the package,
+ # i.e. either "/A" or "/A/B" (or none - no need to check "/A/B/C").
+ prefix = ""
+ for (i = 2; i < n-1; i++) {
+ prefix = prefix "/" comp[i]
+ if (prefix in OWN)
+ break
+ }
+ if (!prefix)
+ return
+ # check if every subdir under the prefix is also owned
+ subdir = prefix
+ for (j = i+1; j < n; j++) {
+ subdir = subdir "/" comp[j]
+ if (!(subdir in OWN))
+ printf "%s\t%s\t%s\n", prefix, subdir, path
+ }
+ }
+ END {
+ for (path in OWN)
+ check_path(path)
+ }'
+}
+
+check_subdirs()
+{
+ local f="$1"; shift || return
+ local subdirs="$(find_unpackaged_subdirs)"
+ [ -n "$subdirs" ] || return 0
+ local tab="$(printf '\t')"
+ subdirs=$(printf '%s\n' "$subdirs" |sort -t "$tab" -u -k2,2)
+ local prefix subdir path
+ printf '%s\n' "$subdirs" |
+ while IFS="$tab" read -r prefix subdir path; do
+ FileError "unpackaged directory: $subdir" "$f"
+ done
+ return 1
+}
+
+run_check()
+{
+ if ! check_subdirs "$1"; then
+ Message 'ERROR: you have problems!'
+ return 1
+ fi
+}
В сизиф эта проверка пойдёт, наверное, после окончания фриза.
Если есть возражения, а именно, если есть случаи, когда условие
"иерархической консистентности" владения каталогами выполняться
не должно, я прошу эти возражения озвучить.
Пока же попались следующие *.noarch.rpm пакеты.
[-- Attachment #1.2: noarch-unpackaged-subdirs.txt.gz --]
[-- Type: application/octet-stream, Size: 1928 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] sisyphus_check: check-subdirs
2008-05-04 18:03 [devel] sisyphus_check: check-subdirs Alexey Tourbin
@ 2008-05-04 18:17 ` Michael Shigorin
2008-05-04 18:58 ` Alexey Tourbin
1 sibling, 0 replies; 3+ messages in thread
From: Michael Shigorin @ 2008-05-04 18:17 UTC (permalink / raw)
To: devel
On Sun, May 04, 2008 at 10:03:45PM +0400, Alexey Tourbin wrote:
> Я реализовал новую проверку на владение подкаталогами.
> genix mike metromap-0.1.2-alt1.noarch.rpm /usr/share/metromap/modules
Резонно, 0.1.2-alt2. Нечего мусор после rpm -e плодить :)
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] sisyphus_check: check-subdirs
2008-05-04 18:03 [devel] sisyphus_check: check-subdirs Alexey Tourbin
2008-05-04 18:17 ` Michael Shigorin
@ 2008-05-04 18:58 ` Alexey Tourbin
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Tourbin @ 2008-05-04 18:58 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 9853 bytes --]
On Sun, May 04, 2008 at 10:03:45PM +0400, Alexey Tourbin wrote:
> Пока же попались следующие *.noarch.rpm пакеты.
А также *.i586.rpm пакеты.
rider shrek libImageMagick-devel-6.3.7.2-alt1.1.i586.rpm /usr/share/doc/ImageMagick-6.3.7/www
lakostis MySQL-server-5.0.51-alt2.a.i586.rpm /var/lib/mysql/usr
lakostis MySQL-server-5.0.51-alt2.a.i586.rpm /var/lib/mysql/usr/share
lav ananas-0.9.5-alt1.i586.rpm /usr/share/ananas/translations
kirill libaot-1.74.1-alt0.1.i586.rpm /usr/share/aot/Bin
@nobody apache2-mod_security-2.1.1-alt1.i586.rpm /etc/mod_security/rules
@nobody apache2-mod_security-2.1.1-alt1.i586.rpm /etc/mod_security/rules/blocking
mithraen asterisk1.6-1.6.0-alt0.beta7.1.i586.rpm /usr/share/doc/asterisk1.6-1.6.0/samples
mithraen asterisk1.6-1.6.0-alt0.beta7.1.i586.rpm /var/lib/asterisk/phoneprov
voins cook-2.31-alt1.i586.rpm /usr/share/cook/en
seriv ldv inger dovecot-1.0.13-alt1.i586.rpm /usr/lib/dovecot/modules
seriv ldv inger dovecot-1.0.13-alt1.i586.rpm /usr/lib/dovecot/modules/imap
seriv ldv inger dovecot-1.0.13-alt1.i586.rpm /usr/lib/dovecot/modules/lda
seriv ldv inger dovecot-1.0.13-alt1.i586.rpm /usr/lib/dovecot/modules/pop3
seriv dovecot11-1.1.alpha1-alt1.hg20070722.i586.rpm /usr/lib/dovecot11/modules
seriv dovecot11-1.1.alpha1-alt1.hg20070722.i586.rpm /usr/lib/dovecot11/modules/imap
seriv dovecot11-1.1.alpha1-alt1.hg20070722.i586.rpm /usr/lib/dovecot11/modules/lda
seriv dovecot11-1.1.alpha1-alt1.hg20070722.i586.rpm /usr/lib/dovecot11/modules/pop3
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/16x16
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/16x16/actions
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/16x16/apps
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/16x16/status
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/22x22
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/22x22/actions
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/22x22/apps
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/22x22/status
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/24x24
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/24x24/actions
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/24x24/apps
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/24x24/status
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/32x32
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/32x32/apps
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/32x32/status
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/48x48
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/48x48/apps
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/48x48/status
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/scalable
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/scalable/apps
icesik empathy-0.22.1-alt1.i586.rpm /usr/share/empathy/icons/hicolor/scalable/status
dlebkov flow-tools-0.68-alt3.1.i586.rpm /etc/flow-tools/cfg
dlebkov flow-tools-0.68-alt3.1.i586.rpm /usr/share/flow-tools/sym
abr gap-4.4-alt2.i586.rpm /usr/lib/gap4.4/bin
abr gap-4.4-alt2.i586.rpm /usr/lib/gap4.4/bin/i586-alt-linux-gnu-i586-alt-linux-gcc
abr gap-pkg-tomlib-4.4-alt2.i586.rpm /usr/lib/gap4.4/pkg/tomlib/doc
abr gap-pkg-tomlib-4.4-alt2.i586.rpm /usr/lib/gap4.4/pkg/tomlib/htm
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/en_GB
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/en_GB/LC_MESSAGES
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/pt_BR
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/pt_BR/LC_MESSAGES
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/zh_CN
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/zh_CN/LC_MESSAGES
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/zh_TW
ldv glibc-locales-2.5.1-alt4.i586.rpm /usr/share/locale/zh_TW/LC_MESSAGES
ktirf @gnome gnome-disk-usage-2.20.0.1-alt1.qa1.i586.rpm /usr/share/baobab/pixmaps
lav gnucash-2.2.4-alt2.i586.rpm /usr/share/gnucash/xml
boyarsh hugin-0.7.0-alt3.beta4.i586.rpm /usr/share/hugin/xrc
vvk jigdo-0.7.3-alt2.i586.rpm /usr/share/jigdo/pixmaps
zerg kdebase-konqueror-3.5.9-alt7.i586.rpm /usr/share/apps/konqueror/servicemenus
zerg kdebase-konqueror-3.5.9-alt7.i586.rpm /usr/share/apps/konqueror/tiles
mithraen @kernel kernel-modules-zaptel-hpc-1.4.9.2-alt2.132626.1.i586.rpm /lib/modules/2.6.18-hpc-alt1/zaptel/ti24
mithraen @kernel kernel-modules-zaptel-ovz-smp-1.4.9.2-alt2.132626.23.i586.rpm /lib/modules/2.6.18-ovz-smp-alt23/zaptel/ti24
@kernel kernel-modules-zaptel-ovz-wks-1.4.9.2-alt2.132626.1.i586.rpm /lib/modules/2.6.18-ovz-wks-alt1/zaptel/ti24
@kernel kernel-modules-zaptel-std-def-1.4.9.2-alt2.132632.6.i586.rpm /lib/modules/2.6.24-std-def-alt6/zaptel/ti24
@kernel kernel-modules-zaptel-std-ll-1.4.9.2-alt1.132632.1.i586.rpm /lib/modules/2.6.24-std-ll-alt1/zaptel/ti24
@kernel kernel-modules-zaptel-std-se-1.4.9.2-alt2.132632.3.i586.rpm /lib/modules/2.6.24-std-se-alt3/zaptel/ti24
@kernel kernel-modules-zaptel-std-srv-1.4.9.2-alt2.132632.1.i586.rpm /lib/modules/2.6.24-std-srv-alt1/zaptel/ti24
mithraen @kernel kernel-modules-zaptel-xen-dom0-1.4.9.2-alt2.132626.7.i586.rpm /lib/modules/2.6.18-xen-dom0-alt7/zaptel/ti24
@kernel kernel-modules-zaptel-xen-domU-1.4.9.2-alt2.132626.6.i586.rpm /lib/modules/2.6.18-xen-domU-alt6/zaptel/ti24
ktirf @gnome libbonobo-devel-2.22.0-alt1.1.i586.rpm /usr/lib/bonobo-2.0/samples
lav libclip-common-1.2.0cvs-alt1.i586.rpm /usr/share/doc/libclip-1.2.0cvs/example
george libgii-1.0.2-alt1.i586.rpm /usr/lib/ggi/filter
george libgii-1.0.2-alt1.i586.rpm /usr/lib/ggi/input
icesik libsexymm-devel-0.1.9-alt1.i586.rpm /usr/include/libsexymm/libsexymm
icesik libsexymm-devel-0.1.9-alt1.i586.rpm /usr/include/libsexymm/libsexymm/private
icesik libtelepathy-devel-0.3.3-alt1.i586.rpm /usr/include/telepathy-1.0/libtelepathy
zerg licq-common-1.3.5-alt2.i586.rpm /usr/share/licq/qt-gui
inger mvapich-0.9.9-alt2.i586.rpm /usr/lib/mvapich/bin
inger mvapich-0.9.9-alt2.i586.rpm /usr/lib/mvapich/man
inger mvapich-0.9.9-alt2.i586.rpm /usr/lib/mvapich/man/man1
inger mvapich2-1.0.1-alt3.1.i586.rpm /usr/lib/mvapich2/bin
inger mvapich2-1.0.1-alt3.1.i586.rpm /usr/lib/mvapich2/man
inger mvapich2-1.0.1-alt3.1.i586.rpm /usr/lib/mvapich2/man/man1
serpiph netams-apache2-3.4.0rc2-alt5.i586.rpm /var/www/apache2/addon-modules/netams/stat
dans openmpi-1.2.6-alt1.i586.rpm /usr/lib/openmpi/bin
dans openmpi-1.2.6-alt1.i586.rpm /usr/lib/openmpi/lib
dans openmpi-1.2.6-alt1.i586.rpm /usr/lib/openmpi/lib/openmpi
dans openmpi-1.2.6-alt1.i586.rpm /usr/lib/openmpi/man
naf perl-Gtk2-GladeXML-1.006-alt1.i586.rpm /usr/lib/perl5/vendor_perl/i386-linux/Gtk2/GladeXML
misha @pgsql postgresql8.3-server-8.3.1-alt3.i586.rpm /usr/share/pgsql/tsearch_data
lav syatskevich pybookreader-0.5.0-alt5.qa1.i586.rpm /usr/lib/python2.5/site-packages/pybookreader/dictclient
drool qmmp-0.2-alt0.1.svn354.i586.rpm /usr/lib/qmmp/Input
drool qmmp-0.2-alt0.1.svn354.i586.rpm /usr/lib/qmmp/Output
ktirf revelation-0.4.11-alt2.1.i586.rpm /usr/lib/python2.5/site-packages/revelation/bundle
ktirf revelation-0.4.11-alt2.1.i586.rpm /usr/lib/python2.5/site-packages/revelation/datahandler
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/chrome/icons
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/chrome/icons/default
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/defaults/autoconfig
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/defaults/messenger
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/defaults/messenger/US
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/greprefs
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/init.d
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/isp
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/res/dtd
damir seamonkey-1.1.9-alt2.i586.rpm /usr/lib/mozilla/res/fonts
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/example-lesson-files
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/feta
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/help
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/lesson-files
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/mpd
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/soundcard
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/src
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/themes
karpov viy solfege-3.10.3-alt1.i586.rpm /usr/share/solfege/themes/svg
drool stargazer-2.404.9.7-alt1.i586.rpm /usr/share/stargazer/admins
drool stargazer-2.404.9.7-alt1.i586.rpm /usr/share/stargazer/tariffs
drool stargazer-2.404.9.7-alt1.i586.rpm /usr/share/stargazer/users
drool stargazer-2.404.9.7-alt1.i586.rpm /usr/share/stargazer/users/test
icesik libtelepathy-glib-devel-0.7.3-alt1.i586.rpm /usr/include/telepathy-1.0/telepathy-glib/_gen
ab ldv imz tetex-core-2.0-alt4.i586.rpm /usr/share/texmf/doc/help
ab ldv imz tetex-core-2.0-alt4.i586.rpm /usr/share/texmf/doc/help/Catalogue
ab ldv imz tetex-core-2.0-alt4.i586.rpm /usr/share/texmf/doc/help/Catalogue/entries
ab ldv imz tetex-core-2.0-alt4.i586.rpm /var/cache/texmf/web2c
vvk thresh unreal-3.2.7-alt3.i586.rpm /var/lib/unreal/usr
vvk thresh unreal-3.2.7-alt3.i586.rpm /var/lib/unreal/var
sass xcdroast-0.98alpha15-alt6.i586.rpm /usr/share/doc/xcdroast/manual
eostapets xfce4-xfmedia-devel-0.9.2-alt1.i586.rpm /usr/lib/xfmedia/plugins
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-04 18:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-04 18:03 [devel] sisyphus_check: check-subdirs Alexey Tourbin
2008-05-04 18:17 ` Michael Shigorin
2008-05-04 18:58 ` 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