Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71898 - sys-libs/pam shouldn't be an app-office/openoffice-1.1.3-r1's mandatory dependency
Summary: sys-libs/pam shouldn't be an app-office/openoffice-1.1.3-r1's mandatory depen...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
: 131679 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-20 16:24 UTC by lukenshiro
Modified: 2006-04-30 10:14 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
no-pam proposed patch for openoffice-1.1.3-r1 (openoffice-1.1.3-no-pam.patch,1.53 KB, patch)
2004-11-22 04:38 UTC, lukenshiro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lukenshiro 2004-11-20 16:24:10 UTC
As I said in http://bugs.gentoo.org/show_bug.cgi?id=57195 if a user don't want to install pam* he can't install openoffice-1.1.3-r1 (but the same behaviour happens with previous versions)

Now I've openoffice-1.1.3 and I can't re-emege it or upgrade to openoffice-1.1.3-r1 because of pam lack. But if I install pam and openoffice, then I unmerge pam, openoffice seems to work indeed.
IMHO I should be able to emerge openoffice* also if I decide to not emerge pam* (or if I've already unmerged it). I think it is better to create a "pam" USE flag for such important package.

Thank you for your cooperation.

Reproducible: Always
Steps to Reproduce:
//

Actual Results:  
// 

Expected Results:  
//
Comment 1 Andreas Proschofsky (RETIRED) gentoo-dev 2004-11-21 05:13:57 UTC
If I remember correctly the pam dependency is not needed for running but for building OOo. Are you able to build it without pam? If not, there is no possibility to remove it.
Comment 2 lukenshiro 2004-11-22 04:36:40 UTC
Yes, I think so. Without pam openoffice can't be built.

But I found a patch here for OO-1.1.1 http://www.linuxfromscratch.org/patches/blfs/5.1/openoffice-1.1.1-no-pam.patch
BTW it can't be used with in OO-1.1.3* because of sal/osl/unx/security.c's structure's modify, so I've written a little patch (starting from that above) to apply in OOo_1.1.3-1_source.tar.gz. It seems to work and OO builds well without problem, but I've to say that I'm not a programmer :)
Comment 3 lukenshiro 2004-11-22 04:38:50 UTC
Created attachment 44460 [details, diff]
no-pam proposed patch for openoffice-1.1.3-r1
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2004-11-23 06:50:41 UTC
I'll try to look what pam does in openoffice. Maybe it is a very usefull feature.
Comment 5 Tero Grundström 2004-12-26 14:36:22 UTC
I too would like to see that it would be possible emerge OOo w/o pam installed in the system.

Here is some additional information from LFS:
http://linuxfromscratch.org/~tushar/hints/openoffice.txt
Comment 6 Peter Ruskin 2004-12-27 16:12:22 UTC
Although openoffice doesn't really pam to run, it wants pam headers to build, so I downloaded Linux PAM headers from http://www.linuxfromscratch.org/~tushar/hints/files/OpenOfficeFromScratch/Linux-PAM-0.76-headers.tar.bz2 to /usr/include and extracted them there.

You end up with /usr/include/security:
$ ll /usr/include/security
total 96
drwxr-xr-x    2 10124 10124  4096 Sep 10  2002 .
drwxr-xr-x  231 root  root  32768 Dec 26 22:11 ..
-r--r--r--    1 10124 10124  2491 Sep 10  2002 _pam_aconf.h
-rw-r--r--    1 10124 10124  2847 Sep 10  2002 _pam_compat.h
-rw-r--r--    1 10124 10124  5809 Sep 10  2002 _pam_macros.h
-rw-r--r--    1 10124 10124 12301 Sep 10  2002 _pam_types.h
-rw-r--r--    1 10124 10124  3294 Sep 10  2002 pam_appl.h
-rw-r--r--    1 10124 10124  7250 Sep 10  2002 pam_client.h
-rw-r--r--    1 10124 10124  1147 Sep 10  2002 pam_filter.h
-rw-r--r--    1 10124 10124  1970 Sep 10  2002 pam_misc.h
-rw-r--r--    1 10124 10124  6451 Sep 10  2002 pam_modules.h

I copied the pam ebuild to my overlay and deleted its hard DEPEND on pam.  

Bingo!!  It works :-)
$ genlop -t app-office/openoffice-1.1.3-r1
 * app-office/openoffice
     Mon Dec 27 23:35:04 2004 --> app-office/openoffice-1.1.3-r1
       merge time: 7 hours, 38 minutes, and 46 seconds.
Comment 7 Peter Ruskin 2004-12-29 04:47:23 UTC
Fix at Comment #6 also works for openoffice-1.1.4.  As a test, I temporarily removed /usr/include/security an, sure enough, the ebuild failed because it couldn't find the pam headers; put it back and ebuild completed with success.
Comment 8 Andreas Proschofsky (RETIRED) gentoo-dev 2005-01-24 03:04:32 UTC
@Peter: Copying the headers to /usr/include is not really a feasible solution we can use in the ebuild. What about the patch from lukenshiro? Doesn't this work? Or has this some side effects?
Comment 9 Peter Ruskin 2005-01-24 05:17:52 UTC
OK, I just tried the patch from lukenshiro with 1.1.4.  I saved it as /usr/local/portage/app-office/openoffice/files/1.1.4/openoffice-no-pam.patch.  Then I added this to src_unpack():
	if ! use pam
	then
		epatch ${FILESDIR}/${PV}/openoffice-no-pam.patch
	fi
I temporarily removed /usr/include/security (I'd already deleted the hard DEPEND on pam in the ebuild.

I started the emerge, epatch applied the openoffice-no-pam.patch without error but the emerge bombed out after a few minutes with:

------------------------------
Making: ../../unxlngi4.pro/obj/security.obj
gcc -fmessage-length=0 -c -I.  -I. -I../inc -I../../inc -I../../unx/inc -I../../unxlngi4.pro/inc-I. -I/var/tmp/portage/openoffice-1.1.4/work/solver/645/unxlngi4.pro/inc/dont_use_stl -I/var/tmp/portage/openoffice-1.1.4/work/solver/645/unxlngi4.pro/inc/external -I/var/tmp/portage/openoffice-1.1.4/work/solver/645/unxlngi4.pro/inc -I/var/tmp/portage/openoffice-1.1.4/work/solenv/unxlngi4/inc -I/var/tmp/portage/openoffice-1.1.4/work/solenv/inc -I/var/tmp/portage/openoffice-1.1.4/work/res -I/var/tmp/portage/openoffice-1.1.4/work/solver/645/unxlngi4.pro/inc/dont_use_stl -I/var/tmp/portage/openoffice-1.1.4/work/solenv/inc/Xp31 -I/opt/blackdown-jdk-1.4.2.01/include -I/opt/blackdown-jdk-1.4.2.01/include/linux -I/opt/blackdown-jdk-1.4.2.01/include/native_threads/include -I/usr/X11R6/include     -I. -I../../res -I. -march=athlon-xp -O2 -pipe -fno-stack-protector -fno-strict-aliasing   -pipe -mcpu=pentiumpro   -DLINUX -DUNX -DVCL -DGCC -DC300 -DINTEL -DGXX_INCLUDE_PATH=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include/g++-v3 -DCVER=C300 -D_USE_NAMESPACE -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DSUPD=645 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DSRX645  -DMULTITHREAD   -o ../../unxlngi4.pro/obj/security.osecurity.c
security.c:136:31: security/pam_appl.h: No such file or directory
security.c:146: error: parse error before "pam_handle_t"
security.c:146: warning: `struct pam_conv' declared inside parameter list
security.c:146: warning: its scope is only this definition or declaration, which is probably notwhat you want
security.c:147: error: parse error before '*' token
security.c:148: error: parse error before '*' token
security.c:149: error: parse error before '*' token
security.c:165: warning: `struct pam_response' declared inside parameter list
security.c:165: warning: `struct pam_message' declared inside parameter list
security.c: In function `osl_PamConversation':
security.c:175: error: invalid application of `sizeof' to an incomplete type
security.c:181: error: `PAM_CONV_ERR' undeclared (first use in this function)
security.c:181: error: (Each undeclared identifier is reported only once
security.c:181: error: for each function it appears in.)
security.c:188: error: dereferencing pointer to incomplete type
security.c:190: error: `PAM_PROMPT_ECHO_OFF' undeclared (first use in this function)
security.c:191: error: invalid use of undefined type `struct pam_response'
security.c:191: error: dereferencing pointer to incomplete type
security.c:192: error: invalid use of undefined type `struct pam_response'
security.c:192: error: dereferencing pointer to incomplete type
security.c:194: error: `PAM_PROMPT_ECHO_ON' undeclared (first use in this function)
security.c:195: error: invalid use of undefined type `struct pam_response'
security.c:195: error: dereferencing pointer to incomplete type
security.c:196: error: invalid use of undefined type `struct pam_response'
security.c:196: error: dereferencing pointer to incomplete type
security.c:198: error: `PAM_ERROR_MSG' undeclared (first use in this function)
security.c:199: error: `PAM_TEXT_INFO' undeclared (first use in this function)
security.c:200: error: `PAM_BINARY_PROMPT' undeclared (first use in this function)
security.c:202: error: invalid use of undefined type `struct pam_response'
security.c:202: error: dereferencing pointer to incomplete type
security.c:203: error: invalid use of undefined type `struct pam_response'
security.c:203: error: dereferencing pointer to incomplete type
security.c:215: error: invalid use of undefined type `struct pam_response'
security.c:215: error: dereferencing pointer to incomplete type
security.c:217: error: invalid use of undefined type `struct pam_response'
security.c:217: error: dereferencing pointer to incomplete type
security.c:218: error: invalid use of undefined type `struct pam_response'
security.c:218: error: dereferencing pointer to incomplete type
security.c:219: error: invalid use of undefined type `struct pam_response'
security.c:219: error: dereferencing pointer to incomplete type
security.c:229: error: `PAM_SUCCESS' undeclared (first use in this function)
security.c: In function `osl_PamAuthentification':
security.c:260: error: `pam_handle_t' undeclared (first use in this function)
security.c:260: error: `pam_handle' undeclared (first use in this function)
security.c:261: error: storage size of `pam_conversation' isn't known
security.c:274: error: `PAM_SUCCESS' undeclared (first use in this function)
dmake:  Error code 1, while making '../../unxlngi4.pro/obj/security.obj'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /var/tmp/portage/openoffice-1.1.4/work/sal/osl/unx
Comment 10 Andreas Proschofsky (RETIRED) gentoo-dev 2005-02-04 03:36:07 UTC
As I can't test this, I'm not going to do this for the moment, see the reasons above. If you have a working, feasible solution, please reopen the bug, until then closing.
Comment 11 Adam 2005-02-10 13:51:24 UTC
On OpenOffice.org, they have a bug report about this:
http://www.openoffice.org/issues/show_bug.cgi?id=8185
It seems someone posted a patch to include the PAM headers right in the OpenOffice code, but they're waiting to test it and include it in the code (though it seems a simple task to patch and test it).

I don't suppose their's any chance of a patch like that going in Gentoo?  It's not too big a deal for me to wait, I can work around it by just always unmerging pam after emerging world, but it might be more confusing for other users.
Comment 12 Adam 2005-02-10 14:27:13 UTC
I suppose another workaround would be emerge the pre-compiled openoffice, openoffice-bin, rather than the source code.
Comment 13 Chris L. Mason 2005-02-10 14:39:52 UTC
>  suppose another workaround would be emerge the pre-compiled openoffice, openoffice-bin, rather than the source code.

Does such exist for ppc64?  (And all other archs?)
Comment 14 Alexander Skwar 2005-08-31 13:21:09 UTC
(In reply to comment #12)
> I suppose another workaround would be emerge the pre-compiled openoffice,
openoffice-bin, rather than the source code.

No, that's not a workaround, as there are no localized packages of openoffice
and openoffice-ximian.

Why is this bug marked "WONTFIX"?
Comment 15 Paul de Vrieze (RETIRED) gentoo-dev 2005-08-31 13:34:04 UTC
The main reason is that most people use pam and thus have it installed. The
second one is that we are close to 2.0 release which is significantly different
from the 1.1 releases. Third one is that you don't need to use pam. You just
merge it, merge openoffice, unmerge it. It's only a build dependency, not a
runtime dependency. The other workaround would be to manually apply the attached
patch that seems to be correct (returning the same as when pam is not available
at runtime) between the unpack and the compile stage.
Comment 16 Matt Whitlock 2006-03-01 10:36:08 UTC
Seems like there could be a new ebuild 'pam-headers' that would block 'sys-libs/pam' (so both couldn't be installed at the same time).  Then openoffice could depend on pam-headers if USE=-pam and on pam if USE=pam.
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-04-29 07:13:28 UTC
*** Bug 131679 has been marked as a duplicate of this bug. ***
Comment 18 Hanno Zysik (geki) 2006-04-30 08:47:29 UTC
I did a patch to make PAM optional.
http://www.openoffice.org/issues/show_bug.cgi?id=64923
Comment 19 Andreas Proschofsky (RETIRED) gentoo-dev 2006-04-30 10:14:12 UTC
Already seen it ;) Thanks Hanno. As far as I can see you already put it into ooo-build, so we can use it for 2.0.3 (don't think this is that important to put it in before)