Issue 112761 - instsetoo_native: breaks without PKGFORMAT set
Summary: instsetoo_native: breaks without PKGFORMAT set
Status: CLOSED FIXED
Alias: None
Product: Installation
Classification: Application
Component: code (show other issues)
Version: DEV300m83
Hardware: Unknown All
: P2 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: rene
QA Contact: issues@installation
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2010-06-28 15:48 UTC by rene
Modified: 2017-05-20 10:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description rene 2010-06-28 15:48:47 UTC
rene@frodo:~/OpenOffice.org/DEV300_m83/instsetoo_native$ unset
PKGFORMATrene@frodo:~/OpenOffice.org/DEV300_m83/instsetoo_native$ build
build -- version: 275224


=============
Building module instsetoo_native
=============

Entering
/home/rene/OpenOffice.org/DEV300_m83/instsetoo_native/inc_openoffice/windows/msi_languages


Entering /home/rene/OpenOffice.org/DEV300_m83/instsetoo_native/inc_openoffice/unix


Entering /home/rene/OpenOffice.org/DEV300_m83/instsetoo_native/util

dmake:  makefile.mk:  line 216:  Error: -- Missing targets or attributes in rule

Breaks my builds. This patch fixes it:

--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -201,6 +201,7 @@
 
 .ENDIF			# "$(BUILD_SPECIAL)"!=""
 
+.IF "$(PKGDORMAT)" != ""
 $(foreach,i,$(alllangiso) openoffice_$i) : $$@{$(PKGFORMAT:^".")}
 .IF "$(MAKETARGETS)"!=""
 .IF "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)"
@@ -277,6 +278,7 @@
 	@echo cannot pack nothing...
 
 .ENDIF			# "$(alllangiso)"!=""
+.ENDIF
 
 .IF "$(LOCALPYFILES)"!=""
 $(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive}
openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")}
broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")}
brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack :
$(LOCALPYFILES)

and results in

$ build
build -- version: 275224


=============
Building module instsetoo_native
=============

Entering
/home/rene/OpenOffice.org/DEV300_m83/instsetoo_native/inc_openoffice/windows/msi_languages


Entering /home/rene/OpenOffice.org/DEV300_m83/instsetoo_native/inc_openoffice/unix


Entering /home/rene/OpenOffice.org/DEV300_m83/instsetoo_native/util

cannot pack nothing...
rene@frodo:~/OpenOffice.org/DEV300_m83/instsetoo_native$

Not sure about the actual patch, as smoketestoo_native will expect a "archive"
build, but in emergency you can do a build in instsetoo_native then again with
PKGFORMAT=archive...
Comment 1 rene 2010-06-28 15:49:08 UTC
regression, worked in m77
Comment 2 rene 2010-06-28 15:52:11 UTC
PKG*F*ORMAT of course.
Comment 3 ingo.schmidt-rosbiegal 2010-06-28 16:22:22 UTC
is -> sb: You have included that Windows installation sets are forced to
ARCHIVE. Do you agree with this patch?
Comment 4 Stephan Bergmann 2010-06-29 08:25:25 UTC
@rene:  Why do you want a build environment where PKGFORMAT is not set (and what
shall be built in that case)?  From looking at configure.in, the only scenario
where PKGFORMAT could at least be empty would be to use --with-package-format
without an argument, which is however not sanctioned by the usage explanation
for that switch.
Comment 5 rene 2010-06-29 08:51:48 UTC
sb: simply because we don't create the installset in instsetoo_native but call
make_installer.pl to do a "simple" (aka get all the gid_* files put out too)
install into a di. (And we need those gid_ files for knowing what to go where in
the resulting packages)

And PKGFORMAT empty/undefined is easy. --disable-epm :)
Comment 6 Stephan Bergmann 2010-06-29 09:51:52 UTC
Ah, right, --disable-epm (we already discussed that back in January,
<http://porting.openoffice.org/servlets/ReadMsg?list=dev&msgNo=17347>).

So, if I understand correctly, the situation is as follows:

Before DEV300_m77, empty/unset PKGFORMAT caused instsetoo_native/util to call
make_installer.pl without -format switch.

Since DEV300_m77, instsetoo_native/util implicitly (but erroneously) assumes
that PKGFORMAT is non-empty, and always calls make_installer.pl with -format switch.

However, make_installer.pl called without -format switch is the same as "-format
native" (see

  if ( ! $installer::globals::packageformat ) {
$installer::globals::packageformat = "native"; }

in sub setglobalvariables in solenv/bin/modules/installer/parameter.pm).

So, instead of re-complicating things in instsetoo_native/util/makefile.mk,
would it not be better to change configure.in so that it sets PKGFORMAT=native
when --disable-epm?  (A quick check of building instsetoo_native/util with
PKGFORMAT=native fails for me with "dpkg-deb: package name has characters that
aren't lowercase alphanums or `-+.'" when it calls epm, but it is unclear to me
whether that is due to my setup or a real problem.)

Any other places apart from instsetoo_native/util/makefile.mk that mention
PKGFORMAT would not be affected by such a change, it appears: start_build_server
in solenv/bin/modules/packager/work.pm reads PKGFORMAT and does something based
on that, but is probably only relevant for the Hamburg build system?; and
sysui/desktop/freedesktop/makefile.mk, sysui/desktop/mandriva/makefile.mk,
sysui/desktop/tg_rpm.mk, sysui/desktop/debian/makefile.mk,
sysui/desktop/suse/makefile.mk, sysui/desktop/util/makefile.mk,
sysui/desktop/redhat/makefile.mk, and setup_native/scripts/makefile.mk only
check whether PKGFORMAT contains "rpm" resp. "deb".
Comment 7 rene 2010-06-29 10:08:06 UTC
sb: in 3.2.1 it does not do anything but prints out a blurb about EPM disabled.
I don't want to "waste" time in instsetoo_native ehen I do --disable-epm.
Otherwise: anything which fixes this and does not cause an attempt to build
one (or 90) installsets/langpacks is fine.
Comment 8 ingo.schmidt-rosbiegal 2010-06-29 13:55:35 UTC
rene: Do you mean, you use this "-simple" switch? Why do you do this? The
alternative is PKGFORMAT=installed. This leads to an installed product and takes
care of additional functionality like registration of extensions. 
By the way, if you do not build installation sets in instsetoo_native but call
make_installer.pl directly, why do you have problems with the makefile in
instsetoo_native/util? This is really a very unusual way to create installation
sets.
Comment 9 rene 2010-06-29 15:44:23 UTC
> rene: Do you mean, you use this "-simple" switch? Why do you do this? The

yes.

> alternative is PKGFORMAT=installed. This leads to an installed product and takes

No, it's not a alternative. For example we don't get the gid_* files, do we?

> care of additional functionality like registration of extensions.               

Which distros will not do in the shipped package but run unopkg add on the
packages' postinst. So that is moot. Extensions shouldn't be registered per
default, otherwise they are not extensions but should be in the core product.

> By the way, if you do not build installation sets in instsetoo_native but 
> call make_installer.pl directly, why do you have problems with the makefile
> in instsetoo_native/util?

Ah, someone who doesn't do builds. a "build --all" in instsetoo_native is used
for the build -- which of course then ends up building instsetoo_native itself.
Comment 10 rene 2010-06-29 15:51:07 UTC
> Which distros will not do in the shipped package but run unopkg add on the
> packages' postinst.

And from m84 onwards not at all anymore with the new "we can just put it into
share/extension"
So that is even more moot.

> Ah, someone who doesn't do builds. a "build --all" in instsetoo_native is used
> for the build -- which of course then ends up building instsetoo_native itself.

Besides that, you want to separate the "build", "test (smoketest)" and "install"
step. Installing all what you build (including SDK etc.) directly
is bad and just wastes time and diskspace and makes everything more complicated.
Comment 11 rene 2010-06-29 16:18:37 UTC
is: but  that all doesn't matter anyways. The build broke and that has to be
fixed. Regardless of whether you like -simple or not or want to force us to
use something else non-working/more complicated. My patch works (except s/D/F/)
and I am actually using the patch right now. sb understood what the problem is..
Comment 12 ingo.schmidt-rosbiegal 2010-06-29 16:54:41 UTC
rene: Why do you think, that PKGFORMAT=installed is more complicated than
-simple or even that it does not work? I do not want to force you to use it, but
I recommend it. Using PKGFORMAT fits much better into the packaging process, you
can set it to "installed", "archive", "rpm", "deb"  and many other possible
packaging formats. Have you ever tested it?
I do not know, what you mean with "For example we don't get the gid_* files, do
we?", because gids are defined in scp2. But if you mean, that the files are
copied to their correct installation location, I can say yes.
PKGFORMAT=installed means, that the product is completely installed.
Comment 13 rene 2010-06-29 17:21:22 UTC
We're drifting away, sorry sb....

> rene: Why do you think, that PKGFORMAT=installed is more complicated than
> -simple or even that it does not work?

Because I did --disable-epm. In the first step I do not want *ANY* packaging at
all. Of course you are right that if you want "packaging" inside
instsetoo_native PKFORMAT must be set.

> I do not want to force you to use it, but I recommend it.

You try to (indirectly) force me instead of just fixing this bug. --disable-epm
means "no packaging at all -> no PKGFORMAT set either".


> Using PKGFORMAT fits much better into the packaging process, you
> can set it to "installed", "archive", "rpm", "deb"  and many other possible
> packaging formats. Have you ever tested it?

Yes.

> I do not know, what you mean with "For example we don't get the gid_* files, do
> we?", because gids are defined in scp2. But if you mean, that the files are

I said gid *files* for a reason.

> copied to their correct installation location, I can say yes.
> PKGFORMAT=installed means, that the product is completely installed.

No, I don't mean the installed files. Hell, you maintain the installer, you
should know what it does (and we iirc already had that discussion once already)

Let's look:

Rootpath: /usr/lib/openoffice 
... installing module gid_Module_Langpack_Brand_zh_TW ...
DestDir: /home/rene/Debian/Pakete/openoffice.org/openoffice.org-3.2.1/debian/tmp 
[...]
$ cd /home/rene/Debian/Pakete/openoffice.org/openoffice.org-3.2.1/debian/tmp
p$ ls | head -n 2
etc
gid_Module_Brand_Prg_Base
^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
$ $ head -n 2 gid_Module_Brand_Prg_Base
%dir /usr/lib/openoffice/program
/usr/lib/openoffice/program/sbase

I bet installed doesn't create them, does it?

But even if it does, that has NOTHING to do with this bug. Even if I used this
I'd have a non-failing instsetoo_native when doing --disable-epm (and
instsetoo_native always is built). That you can do some install (and be it
=installed later) is some completely other story, in fact I do that for =archive
for the smoketest (and with=deb for sysui to get the menu integration structure
packed up easily, as that's not in the "normal" installer process)
Comment 14 rene 2010-06-29 17:37:50 UTC
I'd have a non-failing instsetoo_native when doing --disable-epm (and
   ^ like to
Comment 15 rene 2010-06-30 15:19:16 UTC
is: regardless of whether you like disabling a instset build using
--disable-epm, the option is there, is used in some cases and needs to stay and
stay to work. The patch works.

Please fix it in native317. I can commit myself too if you wish.
Comment 16 Stephan Bergmann 2010-06-30 16:00:01 UTC
@rene:  I would still prefer patch

---8<---
diff -r fad23fb34ff7 configure.in
--- a/configure.in      Thu Jun 17 14:29:52 2010 +0200
+++ b/configure.in      Wed Jun 30 17:03:37 2010 +0200
@@ -3387,15 +3387,16 @@
       fi
    fi
    AC_SUBST(BUILD_EPM)
-   AC_SUBST(PKGFORMAT)
    AC_SUBST(RPM)
    AC_SUBST(DPKG)
    AC_SUBST(PKGMK)
 else
    AC_MSG_RESULT([no])
    EPM=NO
+   PKGFORMAT=native
 fi
 AC_SUBST(EPM)
+AC_SUBST(PKGFORMAT)

 dnl ===================================================================
 dnl Check for gperf
---8<---

as proposed in #desc7.  It does not affect --disable-epm builds (which still
only report "No EPM: do no packaging at this stage", I just checked that), while
it has the advantage that for EPM!=NO behavior of
instsetoo_native/util/makefile.mk stays exactly the same (i.e., effectively
calls make_installer.pl -format native), and that it does not mis-match
.IF/.ENDIF -- your patch seems to break things when alllangiso is empty.
Comment 17 rene 2010-06-30 16:15:23 UTC
sb: fine with me
Comment 18 Stephan Bergmann 2010-06-30 16:31:58 UTC
.
Comment 19 Stephan Bergmann 2010-06-30 16:39:35 UTC
fixed as <http://hg.services.openoffice.org/cws/native317/rev/64d95e6661a5>
Comment 20 Stephan Bergmann 2010-07-07 09:49:43 UTC
@rene: please verify
Comment 21 Olaf Felka 2010-07-07 12:22:50 UTC
of: The submitter is using the patch in his daily work and confirmed that it is
verified.