[opensuse-packaging] Differencies between tools?
I've been thinking a little.. What's the differencies between building packages with y2pmbuild and build? I'd like the best of the worlds.. I'd like to build several architectures in one run (build), but I'd also like to have the packages signed and dumped to the repositary I'm building. One problem is that it appears as the rpm's doesn't get signed.. I have to dig into that a bit more, I'm setting some traps in the y2pmbuild script to see if I can find something out.. I guess a script running 'y2pmbuild-10.1' and then 'linux32 y2pmbuild' would do the trick, but I'd like to know which exit codes y2pmbuild generates for failure and success. -- Anders Norrbring Norrbring Consulting
Anders Norrbring skrev:
I've been thinking a little.. What's the differencies between building packages with y2pmbuild and build?
I'd like the best of the worlds.. I'd like to build several architectures in one run (build), but I'd also like to have the packages signed and dumped to the repositary I'm building.
One problem is that it appears as the rpm's doesn't get signed.. I have to dig into that a bit more, I'm setting some traps in the y2pmbuild script to see if I can find something out..
I guess a script running 'y2pmbuild-10.1' and then 'linux32 y2pmbuild' would do the trick, but I'd like to know which exit codes y2pmbuild generates for failure and success.
Nope, there are no signing taking place.. I just built postfix, and checked the rpm; rpm -Kv my_repositary/x86_64/postfix-2.3.3-6.x86_64.rpm my_repositary/x86_64/postfix-2.3.3-6.x86_64.rpm: Header SHA1 digest: OK (d086df6a323df558af7aabc456a86ea3a33b01b9) MD5 digest: OK (4e4b35914f16bf7e11442d500028261b) -- Anders Norrbring Norrbring Consulting
Anders Norrbring skrev:
Anders Norrbring skrev:
I've been thinking a little.. What's the differencies between building packages with y2pmbuild and build?
I'd like the best of the worlds.. I'd like to build several architectures in one run (build), but I'd also like to have the packages signed and dumped to the repositary I'm building.
One problem is that it appears as the rpm's doesn't get signed.. I have to dig into that a bit more, I'm setting some traps in the y2pmbuild script to see if I can find something out..
I guess a script running 'y2pmbuild-10.1' and then 'linux32 y2pmbuild' would do the trick, but I'd like to know which exit codes y2pmbuild generates for failure and success.
Nope, there are no signing taking place.. I just built postfix, and checked the rpm;
rpm -Kv my_repositary/x86_64/postfix-2.3.3-6.x86_64.rpm my_repositary/x86_64/postfix-2.3.3-6.x86_64.rpm: Header SHA1 digest: OK (d086df6a323df558af7aabc456a86ea3a33b01b9) MD5 digest: OK (4e4b35914f16bf7e11442d500028261b)
It looks like it's a right problem somehow, I just haven't isolated it yet. Another highly annoying thing is that if I build a package with y2pmbuild, it contains rights for the user 'compiler' which of course doesn't exist on any system. So, the result is that when I run rpm -i on a source rpm created, I get these annoying messages: rpm -ivh amavisd-new-2.4.3_rc2-2.src.rpm 1:amavisd-new warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root ########################################### [100%] warning: user compiler does not exist - using root warning: user compiler does not exist - using root My question is, how do I get around that, so I get "decent" behaving packages? -- Anders Norrbring Norrbring Consulting
Anders Norrbring skrev: [8<]
It looks like it's a right problem somehow, I just haven't isolated it yet.
Yep, it sure is. I set up a totally default system in VMware VM, and ran through the most basic things, and signing seems to work. At least the build "stopped" at; building cyrus-imapd-testing.spec (user compiler) ----------------------------------------------------------------- ----------------------------------------------------------------- + exec rpmbuild -ba --nodeps --sign /usr/src/packages/SOURCES/cyrus-imapd-testing.spec Enter pass phrase: I never came to that stage on my "real" server.. The problematic machine runs all user verifications from LDAP, so I guess that's the hick-up on that system.. The big question is, how can I get around it so I can start using that machine for building? What users/groups are needed for the build system to work? Should I make changes to /etc/passwd or should I add something to the LDAP DB? Also, is there a way to get pass that password question where rpm needs the pass phrase for the signing procedure? Anders.
On Fri, 29 Sep 2006, Anders Norrbring wrote:
Another highly annoying thing is that if I build a package with y2pmbuild, it contains rights for the user 'compiler' which of course doesn't exist on any system.
So, the result is that when I run rpm -i on a source rpm created, I get these annoying messages:
rpm -ivh amavisd-new-2.4.3_rc2-2.src.rpm 1:amavisd-new warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root ########################################### [100%] warning: user compiler does not exist - using root warning: user compiler does not exist - using root
My question is, how do I get around that, so I get "decent" behaving packages?
Specify user and group in SPEC file in %files section like this: %defattr(644,root,root,755) or for each file like this: %attr(755,root,root) %{_datadir}/mythtv/mythvideo/scripts/allocine.pl --- Cougar --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Cougar skrev:
On Fri, 29 Sep 2006, Anders Norrbring wrote:
Another highly annoying thing is that if I build a package with y2pmbuild, it contains rights for the user 'compiler' which of course doesn't exist on any system.
So, the result is that when I run rpm -i on a source rpm created, I get these annoying messages:
rpm -ivh amavisd-new-2.4.3_rc2-2.src.rpm 1:amavisd-new warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root ########################################### [100%] warning: user compiler does not exist - using root warning: user compiler does not exist - using root
My question is, how do I get around that, so I get "decent" behaving packages?
Specify user and group in SPEC file in %files section like this:
%defattr(644,root,root,755)
or for each file like this:
%attr(755,root,root) %{_datadir}/mythtv/mythvideo/scripts/allocine.pl
Thanks! And that would work in a .rpmmacro file as well I guess? -- Anders Norrbring Norrbring Consulting
On 2006-09-29 22:27:39 +0200, Anders Norrbring wrote:
%defattr(644,root,root,755)
or for each file like this:
%attr(755,root,root) %{_datadir}/mythtv/mythvideo/scripts/allocine.pl
no. fix the spec file. but i would wonder if there is no newer amavis somewhere in the buildservice. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Marcus Rueckert skrev:
On 2006-09-29 22:27:39 +0200, Anders Norrbring wrote:
%defattr(644,root,root,755)
or for each file like this:
%attr(755,root,root) %{_datadir}/mythtv/mythvideo/scripts/allocine.pl
no. fix the spec file. but i would wonder if there is no newer amavis somewhere in the buildservice.
darix
I wouldn't think there is.. 2.4.3 isn't released by Mark yet. ;) He expect to release it any day now. That package isn't really the critical one, the big catch is to make the y2pmbuild work as it's intended to. Building the amavis was just a test. I still have the user rights problem on the machine with the LDAP user backend. Any hints on that one would be most welcome! -- Anders Norrbring Norrbring Consulting
On 2006-09-29 23:29:41 +0200, Anders Norrbring wrote:
I wouldn't think there is.. 2.4.3 isn't released by Mark yet. ;) He expect to release it any day now.
That package isn't really the critical one, the big catch is to make the y2pmbuild work as it's intended to. Building the amavis was just a test.
I still have the user rights problem on the machine with the LDAP user backend. Any hints on that one would be most welcome!
than fix the crap spec file that is included. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Marcus Rueckert skrev:
On 2006-09-29 23:29:41 +0200, Anders Norrbring wrote:
I wouldn't think there is.. 2.4.3 isn't released by Mark yet. ;) He expect to release it any day now.
That package isn't really the critical one, the big catch is to make the y2pmbuild work as it's intended to. Building the amavis was just a test.
I still have the user rights problem on the machine with the LDAP user backend. Any hints on that one would be most welcome!
than fix the crap spec file that is included.
darix
That wouldn't help one bit, it's the environment rights problem I'm having problems with, I don't care about the amavis specifically! The message I'm refering to is time stamped Fri, 29 Sep 2006 19:59:59 +0000 (GMT) a bit higher up in this thread. -- Anders Norrbring Norrbring Consulting
On 2006-09-29 23:40:09 +0200, Anders Norrbring wrote:
That wouldn't help one bit, it's the environment rights problem I'm having problems with, I don't care about the amavis specifically!
no the spec file is the problem. the build environment just shows you that the spec is crap. please attach the spec file. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Marcus Rueckert skrev:
On 2006-09-29 23:40:09 +0200, Anders Norrbring wrote:
That wouldn't help one bit, it's the environment rights problem I'm having problems with, I don't care about the amavis specifically!
no the spec file is the problem. the build environment just shows you that the spec is crap. please attach the spec file.
darix
So, what you're saying is that any spec file I try with would cause the build system to set file rights to the build system causing all sorts of problems? Examples, the user "compiler" cannot read files in /etc/sysconfig The signing certificate cannot be installed and read correctly because of file system rights. That's not caused by any spec file if you ask me, it happens with any spec file I try, spec files provided by released products in SUSE 10.1. For example php5, postfix, cyrus-imap, mysql and apache2. Source rpms downloaded from the 10.1 inst_source at gwdg.de. Those very same spec files working perfectly fine in the test setup I made in a VM. I'd say it's NOT the spec files causing that, it's the environment where y2pmbuild runs. My guess is that it's due to having LDAP as the user verification backend, but I can't really see the connection there. -- Anders Norrbring Norrbring Consulting
Anders Norrbring skrev:
Cougar skrev:
On Fri, 29 Sep 2006, Anders Norrbring wrote:
Another highly annoying thing is that if I build a package with y2pmbuild, it contains rights for the user 'compiler' which of course doesn't exist on any system.
So, the result is that when I run rpm -i on a source rpm created, I get these annoying messages:
rpm -ivh amavisd-new-2.4.3_rc2-2.src.rpm 1:amavisd-new warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root ########################################### [100%] warning: user compiler does not exist - using root warning: user compiler does not exist - using root
My question is, how do I get around that, so I get "decent" behaving packages?
Specify user and group in SPEC file in %files section like this:
%defattr(644,root,root,755)
or for each file like this:
%attr(755,root,root) %{_datadir}/mythtv/mythvideo/scripts/allocine.pl
Actually that wasn't the problem at all.. It's a the source rpm that has "wrong" owner on the files within. That in turn is due to the y2pmbuild script that changes permissions and owners on the subdirs in /usr/src/packages, despite that the y2pmsh sets up the environment correctly on a 10.1 system. I don't know if earlier systems (pre 10) would do that, I haven't checked.. Anyway, a couple of small changes to the script, and everythings looks fine! --- y2pmbuild +++ y2pmbuild @@ -328,11 +328,11 @@ { [ "$buildroot" = / ] && return 1 - rm -rf "$buildroot"/usr/src/packages - - for i in BUILD RPMS/`arch` RPMS/i386 RPMS/noarch SOURCES SPECS SRPMS; do - mkdir -p "$buildroot"/usr/src/packages/$i - done +# rm -rf "$buildroot"/usr/src/packages +# +# for i in RPMS BUILD RPMS/`arch` RPMS/i386 RPMS/noarch SOURCES SPECS SRPMS; do +# mkdir -m 1777 -p "$buildroot"/usr/src/packages/$i +# done find . -maxdepth 1 \( -type f -or -type l \) -and -not -name '.*' \ -print0 | \ @@ -347,8 +347,8 @@ echo adding user $builduser chroot "$buildroot" /usr/sbin/useradd -m $builduser -d $builduserhome fi - echo adjusting permissions - chroot "$buildroot" chown -R $builduser.root /usr/src/packages +# echo adjusting permissions +# chroot "$buildroot" chown -R $builduser.root /usr/src/packages echo 'export PATH=/sbin:/usr/sbin:$PATH' >> "$buildroot"/etc/profile.d/build_path.sh fi -- Anders Norrbring Norrbring Consulting
On Fri, Sep 29, 2006 at 11:10:56PM +0300, Cougar wrote:
On Fri, 29 Sep 2006, Anders Norrbring wrote:
Another highly annoying thing is that if I build a package with y2pmbuild, it contains rights for the user 'compiler' which of course doesn't exist on any system.
So, the result is that when I run rpm -i on a source rpm created, I get these annoying messages:
rpm -ivh amavisd-new-2.4.3_rc2-2.src.rpm 1:amavisd-new warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root warning: user compiler does not exist - using root ########################################### [100%] warning: user compiler does not exist - using root warning: user compiler does not exist - using root
My question is, how do I get around that, so I get "decent" behaving packages?
Specify user and group in SPEC file in %files section like this:
%defattr(644,root,root,755)
or for each file like this:
%attr(755,root,root) %{_datadir}/mythtv/mythvideo/scripts/allocine.pl
This will not work, as this is about .src.rpms. I've patched rpm to support a "_srcdefattr" macro, this is how build does it. It's probably a bug in y2pmbuild that it doesn't use _srcdefattr. CCing Ludwig. Cheers, Michael. -- Michael Schroeder mls@suse.de main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Anders Norrbring
-
Cougar
-
Marcus Rueckert
-
Michael Schroeder