Bug 6144 - makerpms.sh fails on RHEL unpackaged files found
Summary: makerpms.sh fails on RHEL unpackaged files found
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.3.1
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 07:46 UTC by Diego Remolina
Modified: 2020-12-22 00:45 UTC (History)
1 user (show)

See Also:


Attachments
Patch to take care of unpackaged files in samba.spec for RHEL (769 bytes, patch)
2009-02-26 07:48 UTC, Diego Remolina
no flags Details
Patch to support distribution-specific flags within the spec file, and to fix distribution-specific build requirements (1.68 KB, patch)
2009-08-14 16:30 UTC, D.L. Meyer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Remolina 2009-02-26 07:46:01 UTC
error: Installed (but unpackaged) file(s) found:
   /usr/bin/ldbrename
   /usr/bin/sharesec
   /usr/share/locale/de/LC_MESSAGES/pam_winbind.mo
   /usr/share/man/man1/ldbrename.1.gz
   /usr/share/man/man1/sharesec.1.gz
   /usr/share/man/man7/winbind_krb5_locator.7.gz

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/bin/ldbrename
   /usr/bin/sharesec
   /usr/share/locale/de/LC_MESSAGES/pam_winbind.mo
   /usr/share/man/man1/ldbrename.1.gz
   /usr/share/man/man1/sharesec.1.gz
   /usr/share/man/man7/winbind_krb5_locator.7.gz
makerpms.sh: Done.

Suggested patch:

[root@phys-console RHEL]# cat patch-samba.spec
--- samba.spec  2009-02-24 02:59:13.000000000 -0500
+++ samba.spec.patch    2009-02-26 08:19:12.000000000 -0500
@@ -361,6 +361,8 @@
 %{_mandir}/man8/vfs_*.8*
 %{_mandir}/man8/idmap_*.8*

+/usr/share/locale/de/LC_MESSAGES/pam_winbind.mo
+/usr/share/man/man7/winbind_krb5_locator.7.gz

 ##########

@@ -464,7 +466,9 @@
 %{_bindir}/ldbdel
 %{_bindir}/ldbedit
 %{_bindir}/ldbmodify
+%{_bindir}/ldbrename
 %{_bindir}/ldbsearch
+%{_bindir}/sharesec

 %{_mandir}/man1/profiles.1*
 %{_mandir}/man1/testparm.1*
@@ -478,7 +482,9 @@
 %{_mandir}/man1/ldbdel.1*
 %{_mandir}/man1/ldbedit.1*
 %{_mandir}/man1/ldbmodify.1*
+%{_mandir}/man1/ldbrename.1*
 %{_mandir}/man1/ldbsearch.1*
+%{_mandir}/man1/sharesec.1*

 %changelog
 * Fri Jan 16 2004 Gerald (Jerry) Carter <jerry@samba,org>
Comment 1 Diego Remolina 2009-02-26 07:48:04 UTC
Created attachment 3959 [details]
Patch to take care of unpackaged files in samba.spec for RHEL
Comment 2 Diego Remolina 2009-02-26 08:00:54 UTC
One more thing to add is that the default permissions of makerpm.sh do not include execute, so this should be changed as well.

From the original tarbal:

[root@phys-console RHEL]# ls -l
total 72
-rwxr-xr-x 1 8365 users  3603 Feb 24 02:38 makerpms.git.sh
-rw-r--r-- 1 8365 users  1768 Feb 24 02:59 makerpms.sh

Comment 3 Karolin Seeger 2009-03-09 10:19:18 UTC
Applied the patch with some changes.
Will be included in 3.3.2.
Comment 4 Adam Williams 2009-04-07 13:53:42 UTC
Karolin included it in samba 3.3.2.  makerpms.sh compile fine then.  please close and mark as fixed.
Comment 5 Diego Remolina 2009-04-07 13:59:50 UTC
Another thing missing from the spec file is enabling the hashing mechanism by default.

        --with-shared-modules=idmap_rid,idmap_ad,idmap_hash \

I suggest you add this new feature as well, prior to closing this bug report, or should I open a new Bug report?
Comment 6 Karolin Seeger 2009-04-08 10:55:49 UTC
Fixed with bed4f841 in master. Will be in 3.3.4 and 3.4.0.
Closing out bug report.
Please re-open if it's still an issue.

Thanks for reporting!
Comment 7 Diego Remolina 2009-06-17 18:49:49 UTC
makerpm.sh fails on samba-3.3.5 on CentOS5 (will test RHEL5 soon, but expect same problems) on two places.

1. Rpm dependencies

The package keyutils-devel is called keyutils-libs-devel

2. Unpackaged files for pam_winbind man pages. The new version produces the man pages under the man8 prefix and the spec file has an entry as man7

Shown below is a diff file between the original file and the modified spec file which works:

--- /tmp/samba-3.3.5/packaging/RHEL/samba.spec  2009-06-16 06:53:40.000000000 -0400
+++ samba.spec  2009-06-17 19:25:14.000000000 -0400
@@ -28,7 +28,7 @@

 Prefix: /usr
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel, keyutils-devel
+BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel, keyutils-libs-devel

 # Working around perl dependency problem from docs
 %define __perl_requires %{SOURCE998}
@@ -476,7 +476,7 @@
 %{_mandir}/man5/lmhosts.5*
 %{_mandir}/man8/smbpasswd.8*
 %{_mandir}/man7/libsmbclient.7*
-%{_mandir}/man7/pam_winbind.7*
+%{_mandir}/man8/pam_winbind.8*

 %{_mandir}/man1/ldbadd.1*
 %{_mandir}/man1/ldbdel.1*
 
Comment 8 Diego Remolina 2009-06-17 22:26:10 UTC
On RHEL4/CentOS 4 the package is still called keyutils-devel, so the appropriate steps need to be taken to check for keyutils-devel in RHEL4 while checking for keyutils-libs-devel in RHEL5.

Maybe an if/else statement to define BuildRequires for RHEL4 and RHEL5?

> 
> 1. Rpm dependencies
> 
> The package keyutils-devel is called keyutils-libs-devel
> 
Comment 9 Karolin Seeger 2009-07-27 08:11:02 UTC
The man pam_winbind issue has already been fixed.
Comment 10 Diego Remolina 2009-08-12 12:38:27 UTC
The dependency check in the included spec file is still broken in the new 3.3.7

[root@phys-console RHEL]# sh makerpms.sh
Supported RPM version [4.4.2.3]
/tmp/samba-3.3.7/packaging/RHEL /tmp/samba-3.3.7/packaging/RHEL
/tmp/samba-3.3.7/packaging/RHEL
/tmp/samba-3.3.7/packaging/RHEL /tmp/samba-3.3.7/packaging/RHEL
Creating samba-3.3.7.tar.bz2 ... Done.
/tmp/samba-3.3.7/packaging/RHEL
setup/
setup/winbind.init
setup/swat
setup/filter-requires-samba.sh
setup/samba.sysconfig
setup/smbprint
setup/swat.desktop
setup/smbusers
setup/smb.init
setup/samba.pamd
setup/smb.conf
setup/samba.log
makerpms.sh: Getting Ready to build release package
error: Failed build dependencies:
        keyutils-devel is needed by samba-3.3.7-1.x86_64
makerpms.sh: Done.

The package keyutils-devel (valid in RHEL4) has been renamed keytuils-libs-devel in RHEL5

[root@phys-console RHEL]# rpm -qa | grep keyutils
keyutils-libs-1.2-1.el5
keyutils-libs-1.2-1.el5
keyutils-libs-devel-1.2-1.el5

Anybody wanting to build 3.3.7 on RHEL5 must adjust the spec file.
Comment 11 D.L. Meyer 2009-08-14 16:27:28 UTC
(In reply to comment #10)
> The dependency check in the included spec file is still broken in the new 3.3.7
> 
> ...
> 
> Anybody wanting to build 3.3.7 on RHEL5 must adjust the spec file.
> 

I need to build packages for both RHEL4 & RHEL5, so I've developed a patch to apply to the spec file that allows the builder to designate the distribution, and fixes this change in the build dependencies.   This modification sets distribution specific %defines that can be used elsewhere in the spec file in the future.  (I've included support for RHEL3 - RHEL6)

Further, this adds a distribution-specific "REVISION" tag, to assist in reducing confusion between packages built for/on RHEL4 & RHEL5.  

Default case:
  $ sh makerpms.sh
>>>  builds essentially as-is:  no distribution-specific REVISION

Special use cases: 
  $ sh makerpms.sh "--with rhel5"
>>>  builds with a %define setting RHEL5, and a REVISION of ".el5"

  $ sh makerpms.sh "--with rhel4"
>>>  builds with a %define setting RHEL4, and a REVISION of ".el4"

One can also define the "%dist" value in ~/.rpmmacros, which will set the default distribution-spec for the particular environment, allowing you to simply use the default build command: "sh makerpms.sh".

[suggested patch to follow...]
Comment 12 D.L. Meyer 2009-08-14 16:30:58 UTC
Created attachment 4563 [details]
Patch to support distribution-specific flags within the spec file, and to fix distribution-specific build requirements

This patch also applies to the 3.2.14 source tree, as the same problem with distribution-specific build requirements exists there.
Comment 13 Björn Jacke 2020-12-22 00:45:00 UTC
we don't maintain packaging files in samba upstream any more