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 anysystem.So, the result is that when I run rpm -i on a source rpm created, I get theseannoying messages: rpm -ivh amavisd-new-2.4.3_rc2-2.src.rpm1:amavisd-new warning: user compiler does not exist - using rootwarning: 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 rootMy 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
smime.p7s
Description: S/MIME Cryptographic Signature
