Bug 38708 - denies to install a "pentium4" pkg on a machine where rpm-build builds such pkgs by default
Summary: denies to install a "pentium4" pkg on a machine where rpm-build builds such p...
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: rpm (show other bugs)
Version: unstable
Hardware: x86 Linux
: P5 minor
Assignee: Ivan Zakharyaschev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-13 21:37 MSK by Ivan Zakharyaschev
Modified: 2020-08-29 05:43 MSK (History)
6 users (show)

See Also:


Attachments
rpminstall-tests-archcompat-checkinstall log (38.56 KB, text/x-log)
2020-07-13 21:37 MSK, Ivan Zakharyaschev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2020-07-13 21:37:15 MSK
Created attachment 8868 [details]
rpminstall-tests-archcompat-checkinstall log

rpm-4.13.0.1-alt23

The error is like this:

Записан: /tmp/sh.BXWW4MIf/RPMS/dummy/pentium4/dummy-1-alt1.pentium4.rpm
rpm --dbpath '/tmp/sh.BXWW4MIf/sh.QqPUf4pB' --justdb -i RPMS/dummy/pentium4/dummy-1-alt1.pentium4.rpm
        пакет dummy-1-alt1.pentium4 предназначен для архитектуры different

Excerpts from the full log thx amakeenk@ :

# apt-get install rpminstall-tests-archcompat-checkinstall
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Следующие дополнительные пакеты будут установлены:
  autoconf autoconf-common autoconf_2.60 automake automake-common automake_1.16 binutils bison bison-runtime checkinstall-helper-sh-safely elfutils emacs-base gcc gcc8 gettext-tools glibc glibc-devel glibc-kernheaders
  glibc-kernheaders-generic glibc-kernheaders-x86 gnu-config kernel-headers-common libasan5 libasm libcrypt-devel libitm1 libmpx2 librpm librpmbuild librpmbuild7 libtextstyle libtool libtool-common libtool_2.4 libubsan1 libvtv0 m4
  patch perl-CPAN-Meta-Requirements perl-threads rpm-build rpm-build-perl rpm-build-python rpminstall-tests rpmspec tmpdir.sh
Следующие НОВЫЕ пакеты будут установлены:
  autoconf autoconf-common autoconf_2.60 automake automake-common automake_1.16 binutils bison bison-runtime checkinstall-helper-sh-safely elfutils emacs-base gcc gcc8 gettext-tools glibc glibc-devel glibc-kernheaders
  glibc-kernheaders-generic glibc-kernheaders-x86 gnu-config kernel-headers-common libasan5 libasm libcrypt-devel libitm1 libmpx2 librpm librpmbuild librpmbuild7 libtextstyle libtool libtool-common libtool_2.4 libubsan1 libvtv0 m4
  patch perl-CPAN-Meta-Requirements perl-threads rpm-build rpm-build-perl rpm-build-python rpminstall-tests rpminstall-tests-archcompat-checkinstall rpmspec tmpdir.sh
0 будет обновлено, 47 новых установлено, 0 пакетов будет удалено и 0 не будет обновлено.
Необходимо получить 25,8MB архивов.
После распаковки потребуется дополнительно 94,8MB дискового пространства.
Продолжить? [Y/n] 
Получено: 1 http://mirror.ipa.basealt.ru noarch/classic autoconf-common 0.3.1-alt1@1533421647 [3220B]
Получено: 2 http://mirror.ipa.basealt.ru i586/classic m4 1.4.18-alt2:sisyphus+221902.4300.4.1@1550599886 [203kB]
Получено: 3 http://mirror.ipa.basealt.ru noarch/classic autoconf_2.60 2:2.69-alt6:p9+238696.100.1.1@1570226680 [577kB]
Получено: 4 http://git.altlinux.org repo/254187/i586/task librpm 4.0.4-alt141:p9+254187.160.8.1@1594286568 [320kB]
Получено: 5 http://mirror.ipa.basealt.ru noarch/classic autoconf 2:2.69-alt4@1533423868 [4098B]
Получено: 6 http://mirror.ipa.basealt.ru noarch/classic automake-common 0.4.1-alt1@1533733564 [3263B]
Получено: 7 http://mirror.ipa.basealt.ru noarch/classic gnu-config 1.0.895.9e51-alt1:sisyphus.218625.100@1545832480 [23,4kB]
Получено: 8 http://mirror.ipa.basealt.ru i586/classic perl-threads 1:5.28.2-alt2:p9+244939.100.2.1@1580477848 [61,4kB]
Получено: 9 http://mirror.ipa.basealt.ru noarch/classic automake_1.16 1.16.1-alt1:sisyphus+226928.100.1.1@1554814755 [613kB]
Получено: 10 http://mirror.ipa.basealt.ru noarch/classic automake 1:1.16-alt1:sisyphus+226889.100.2.1@1554763109 [3090B]
Получено: 11 http://mirror.ipa.basealt.ru i586/classic binutils 1:2.31.1-alt4:sisyphus+221902.1000.4.1@1550588337 [4868kB]
Получено: 12 http://git.altlinux.org repo/254187/i586/task librpmbuild 4.0.4-alt141:p9+254187.160.8.1@1594286568 [159kB]
Получено: 13 http://git.altlinux.org repo/254187/i586/task librpmbuild7 4.13.0.1-alt23:p9+254187.74.8.1@1594286458 [148kB]
Получено: 14 http://git.altlinux.org repo/254187/i586/task rpmspec 4.13.0.1-alt23:p9+254187.74.8.1@1594286458 [90,4kB]
Получено: 15 http://git.altlinux.org repo/254187/i586/task rpm-build 4.0.4-alt141:p9+254187.160.8.1@1594286568 [169kB]
Получено: 16 http://git.altlinux.org repo/254187/i586/task rpminstall-tests 1.1.3-alt6:p9+254187.400.8.1@1594287350 [15,7kB]
Получено: 17 http://git.altlinux.org repo/254187/i586/task rpminstall-tests-archcompat-checkinstall 1.1.3-alt6:p9+254187.400.8.1@1594287350 [8252B]

...

45: rpm-build-4.0.4-alt141                                                                                                        #################################################################################################### [ 96%]
46: rpminstall-tests-1.1.3-alt6                                                                                                   #################################################################################################### [ 98%]
Simple arch_compat tests (between `uname -m`, rpmbuild, and rpm -i):
diagnostics
Linux workstation-9-i586-20200713.localdomain 5.4.48-std-def-alt1 #1 SMP Tue Jun 23 15:07:13 UTC 2020 i686 GNU/Linux
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 6
model name      : Common 32-bit KVM processor
stepping        : 1
microcode       : 0x1
cpu MHz         : 2200.006
cache size      : 16384 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht constant_tsc cpuid tsc_known_freq pni x2apic hypervisor cpuid_fault
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 4400.01
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 0 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 6
model name      : Common 32-bit KVM processor
stepping        : 1
microcode       : 0x1
cpu MHz         : 2200.006
cache size      : 16384 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht constant_tsc cpuid tsc_known_freq pni x2apic hypervisor cpuid_fault
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 4400.01
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 0 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 15
model           : 6
model name      : Common 32-bit KVM processor
stepping        : 1
microcode       : 0x1
cpu MHz         : 2200.006
cache size      : 16384 KB
physical id     : 1
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht constant_tsc cpuid tsc_known_freq pni x2apic hypervisor cpuid_fault
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 4400.01
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 0 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 15
model           : 6
model name      : Common 32-bit KVM processor
stepping        : 1
microcode       : 0x1
cpu MHz         : 2200.006
cache size      : 16384 KB
physical id     : 1
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht constant_tsc cpuid tsc_known_freq pni x2apic hypervisor cpuid_fault
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 4400.01
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 0 bits virtual
power management:

AT_SYSINFO:      0xb7ee5c00
AT_SYSINFO_EHDR: 0xb7ee5000
AT_HWCAP:    fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht
AT_PAGESZ:       4096
AT_CLKTCK:       100
AT_PHDR:         0x8048034
AT_PHENT:        32
AT_PHNUM:        11
AT_BASE:         0xb7ee7000
AT_FLAGS:        0x0
AT_ENTRY:        0x80498d8
AT_UID:          99
AT_EUID:         99
AT_GID:          99
AT_EGID:         99
AT_SECURE:       0
AT_RANDOM:       0xbfb9b69b
AT_HWCAP2:       0x0
AT_EXECFN:       /bin/echo
AT_PLATFORM:     i686

cat: /etc/rpm/platform: Нет такого файла или каталога
i586
i386
...with a package built for the system rpm's arch (i586):

...

...with a package built for the machine's default arch (pentium4):

...

TESTING dummy_installable
make[1]: вход в каталог «/tmp/sh.BXWW4MIf»
mkdir -p SPECS
cat >SPECS/dummy.spec <<-'EOF'
Name: dummy

Version: 1
Release: alt1
License: dummy license
Group: Other
Summary: dummy summy




AutoReq: no
AutoProv: no


%description
dummy desc

%install

mkdir -p %buildroot`dirname /etc/rpminstall-tests/%name`
# Fill it with some unique value; each time new.
# (We rely on the fact that %%buildroot comes from mktemp.)
echo %buildroot >%buildroot/etc/rpminstall-tests/%name


%files
/etc/rpminstall-tests/%name
EOF
. tmpdir.sh
rpmbuild  --define "_tmppath $TMPDIR" --define "_builddir $TMPDIR/BUILD" --define "_topdir /tmp/sh.BXWW4MIf" --define '_sourcedir /tmp/sh.BXWW4MIf' --define '_specdir /tmp/sh.BXWW4MIf/SPECS' --define '_srcrpmdir /tmp/sh.BXWW4MIf/SRPMS/dummy' --define '_rpmdir /tmp/sh.BXWW4MIf/RPMS/dummy' --define 'disttag %nil' -bb SPECS/dummy.spec
Выполняется(%install): /bin/sh -e /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/rpm-tmp.44487
+ umask 022
+ /bin/mkdir -p /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/BUILD
+ cd /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/BUILD
+ /bin/chmod -Rf u+rwX -- /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot
+ :
+ /bin/rm -rf -- /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot
++ dirname /etc/rpminstall-tests/dummy
+ mkdir -p /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot/etc/rpminstall-tests
+ echo /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot
+ /usr/lib/rpm/brp-alt
Cleaning files in /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot (auto)
Verifying and fixing files in /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot (binconfig,pkgconfig,libtool,desktop)
Checking contents of files in /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot/ (default)
Compressing files in /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot (auto)
Verifying ELF objects in /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/dummy-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal)
Hardlinking identical .pyc and .pyo files
Processing files: dummy-1-alt1
Finding debuginfo files (using /usr/lib/rpm/find-debuginfo-files)
Executing: /bin/sh -e /tmp/sh.BXWW4MIf/sh.QqPUf4pB/sh.vPIFOOmL/rpm-tmp.vCzH9Q
Записан: /tmp/sh.BXWW4MIf/RPMS/dummy/pentium4/dummy-1-alt1.pentium4.rpm
rpm --dbpath '/tmp/sh.BXWW4MIf/sh.QqPUf4pB' --justdb -i RPMS/dummy/pentium4/dummy-1-alt1.pentium4.rpm
        пакет dummy-1-alt1.pentium4 предназначен для архитектуры different
make[1]: *** [/usr/share/rpminstall-tests/dummy.mk:4: dummy_installable] Ошибка 1
make[1]: выход из каталога «/tmp/sh.BXWW4MIf»
FAILED dummy_installable

Passed tests:


XFailed tests:


Failed tests:
dummy_installable

Passed tests: 0
XFailed tests: 0
Failed tests: 1
make: *** [/usr/share/rpminstall-tests/Makefile:30: all_tests] Ошибка 1
ошибка: %prein(rpminstall-tests-archcompat-checkinstall-1.1.3-alt6.noarch) scriptlet failed, exit status 1
ошибка: rpminstall-tests-archcompat-checkinstall-1.1.3-alt6.noarch: установить failed
E: Произошли ошибки при выполнении транзакции
Comment 1 Ivan Zakharyaschev 2020-07-13 22:23:11 MSK
An example where this arch_compat succeeds (for "athlon" packages, rather than "pentium4") -- http://git.altlinux.org/tasks/archive/done/_248/254442/build/700/i586/log :

Wrote: /usr/src/RPM/BUILD/rpminstall-tests-1.1.3/RPMS/dummy/athlon/dummy-1-alt1.athlon.rpm
make[1]: Leaving directory '/usr/src/RPM/BUILD/rpminstall-tests-1.1.3'
make[1]: Entering directory '/usr/src/RPM/BUILD/rpminstall-tests-1.1.3'
rpm --dbpath '/usr/src/tmp/sh.pmfmwTDV' --justdb -i RPMS/dummy/athlon/dummy-1-alt1.athlon.rpm
make[1]: Leaving directory '/usr/src/RPM/BUILD/rpminstall-tests-1.1.3'
PASSED dummy_installable
Comment 2 Dmitry V. Levin 2020-08-29 02:31:14 MSK
rpm and rpm-build use different rules for "pentium4", see e.g. rpm-build commit 4.0.4-alt94~4^2~2
Comment 3 Ivan Zakharyaschev 2020-08-29 02:36:58 MSK
(In reply to Dmitry V. Levin from comment #2)
> rpm and rpm-build use different rules for "pentium4", see e.g. rpm-build
> commit 4.0.4-alt94~4^2~2

Cherry-picking them now...
Comment 4 Repository Robot 2020-08-29 05:43:21 MSK
rpm-4.13.0.1-alt24 -> sisyphus:

 Sat Aug 29 2020 Ivan Zakharyaschev <imz@altlinux> 4.13.0.1-alt24
 [Restored some patches from 4.0.4-alt94]
 - rpmrc.c: recognize new Intel CPUs (Dmitry V. Levin)
 - rpmrc.c: classify SSE2-capable Intel CPUs as "pentium4" (Alexey Tourbin)
   [Restored a patch from 4.0.4-alt98.26]
 - rpmrc.c (is_pentiumN): Added models with nonzero extended model
   (Dmitry V. Levin; reported by Alexander Sharapov).
   (Closes: #38708)