Bug 3919 - indexhtml's %post script reads /etc/product.id, but does not require this file b/c of bogus requires
Summary: indexhtml's %post script reads /etc/product.id, but does not require this fil...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Malo Deniélou
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job
Depends on:
Blocks:
 
Reported: 2011-12-29 19:27 CET by Frederik Himpe
Modified: 2012-04-26 09:46 CEST (History)
7 users (show)

See Also:
Source RPM: indexhtml
CVE:
Status comment:


Attachments
full install.log (398.21 KB, text/plain)
2011-12-29 19:46 CET, Frederik Himpe
Details

Description Frederik Himpe 2011-12-29 19:27:29 CET
From a fresh cauldron install.log:

cat: /etc/product.id: No such file or directory
indexhtml-1-6.mga1.noarch

This happens because indexhtml's %post script accesses /etc/product.id
Comment 1 Manuel Hiebel 2011-12-29 19:31:15 CET
and was mageia-release-Default installed ?
Comment 2 Frederik Himpe 2011-12-29 19:46:33 CET
Created attachment 1302 [details]
full install.log

Yes, but only much later during the installation (line 1806: indexhtml, line 2420: mageia-release-Default).

indexhtml should have
Requires(post): mageia-release or something like that.
Comment 3 Manuel Hiebel 2011-12-29 22:20:35 CET
Yep with the two fix of tmb I understand a little now :)
http://svnweb.mageia.org/packages/cauldron/rpm-helper/current/SPECS/rpm-helper.spec?r1=188774&r2=188773&pathrev=188774

/etc/product.id is in mageia-release-Default

As there is no maintainer for this package I added the committers in CC.

CC: (none) => ahmadsamir3891, ennael1, mageia, rdalverny

Comment 4 Marja Van Waes 2012-03-19 12:53:25 CET
@ Romain

Since you're already working on an indexhtml bug, bug 1306, do you mind taking this one, too?

CC: ahmadsamir3891 => marja11
Summary: %post script reads /etc/product.id, but does not require this file => indexhtml's %post script reads /etc/product.id, but does not require this file

Comment 5 Romain d'Alverny 2012-03-19 16:09:29 CET
Ok, but... how comes /etc/product.id is not available? (I understand it should be required, but I can't see how it couldn't be available on a properly installed system).

As in bug 1306, I'm considering removing the local static page anyway, that will close this issue as a side effect.

Status: NEW => ASSIGNED
Assignee: bugsquad => rdalverny

Comment 6 Thierry Vignaud 2012-04-18 17:03:48 CEST
Romain, we are talking about basic packaging and about installing a system.

Installer preselect the basesystem package which pulls some other packages in order to have a working system.
User select some other packages (either individually or by selecting a desktop).

Then urpmi is used to order packages according to their requires.
As indexhtml doesn't require the package providing /etc/product.id, it may be installed before that pakage, and thus its post script will fail.

The issue is that indexhtml requires mageia-release-common instead of mageia-release. The former doesn't provides /etc/product.id, whereas the later does.

Worse you only require it for uninstalling, not for installing (no "requires(post)" on it)

It's easily reproducible using a chroot (let's say "I"):

mkdir I
urpmi.addmedia --urpmi-root=$PWD/I/ /home/tvignaud/mageia/ --distrib 
urpmi --urpmi-root=$PWD/I/ indexhtml --no-suggests 2>&1|tee LOG.idx
(...)
  114/114: indexhtml             #############################################
cat: /etc/product.id: No such file or directory

Keywords: (none) => Junior_job
Priority: Normal => release_blocker
CC: (none) => thierry.vignaud
Component: Installer => RPM Packages
Assignee: rdalverny => bugsquad
Summary: indexhtml's %post script reads /etc/product.id, but does not require this file => indexhtml's %post script reads /etc/product.id, but does not require this file b/c of bogus requires

Comment 7 Marja Van Waes 2012-04-18 19:42:08 CEST
This bug was reassigned to bugsquad, and bugsquad can't solve this, so for now changing status back from assigned to new

Status: ASSIGNED => NEW

Thierry Vignaud 2012-04-18 22:45:05 CEST

Status: NEW => ASSIGNED
Assignee: bugsquad => rdalverny

Comment 8 AL13N 2012-04-25 23:25:16 CEST
@rda:

can you fix this requires in this bug like tv said? so we can resolv this release_blocker...

CC: (none) => alien

Malo Deniélou 2012-04-25 23:30:08 CEST

CC: (none) => malo
Assignee: rdalverny => malo

Comment 9 Malo Deniélou 2012-04-25 23:35:14 CEST
fixed in svn. Please push the package.
Comment 10 Anne Nicolas 2012-04-26 08:02:37 CEST
Done please tester, check it fixes this bug
Comment 11 Thierry Vignaud 2012-04-26 09:46:03 CEST
At least urpmi --urpmi-root testcase works smoothly now

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.