Re: Building rpms in mock
Sam Varshavchik <[email protected]>
| Newsgroups | gmane.mail.imap.courier.general |
|---|---|
| Message-ID | <[email protected]> |
Zenon Panoussis writes: > >>>> The main problem I'm facing is that neither authlib nor courier >>>> can be built in mock because they expect the user:group to exist. > >>> This should be dealt with now. The new build will, if set up with a static >>> uid:gid, will create it before building courier-authlib, and courier-authlib- >>> config's scriptlet will recreate it when it gets installed. > >> I actually tried just now to use mock, and found a mock-related issue... > > If you run `pwd` in a mock shell, you get '/buildroot/build/BUILD'. > Thus, rpmbuild has no access to /etc and cannot create users and > groups. I suspect that the only way to get around this is to not > require that the user:group actually exist, nor try to create them > in the build process, but to just go ahead and build with whatever > has been --define'ed, or with the default if nothing has been > --define'ed. mock shell gives me a root shell: [mrsam@monster ~]$ mock shell INFO: mock.py version 5.3 starting (python version = 3.12.1, NVR = mock-5.3-1.fc39), args: /usr/libexec/mock/mock shell Start(bootstrap): init plugins INFO: selinux enabled Finish(bootstrap): init plugins Start: init plugins INFO: selinux enabled Finish: init plugins INFO: Signal handler active Start: run Start(bootstrap): chroot init INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start(bootstrap): cleaning package manager metadata Finish(bootstrap): cleaning package manager metadata INFO: Package manager dnf detected and used (fallback) Finish(bootstrap): chroot init Start: chroot init INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start: cleaning package manager metadata Finish: cleaning package manager metadata INFO: enabled HW Info plugin INFO: Package manager dnf detected and used (direct choice) Finish: chroot init Start: shell <mock-chroot> sh-5.2# id uid=0(root) gid=0(root) groups=0(root) <mock-chroot> sh-5.2# echo foo >/etc/bar <mock-chroot> sh-5.2# My userid is a member of the "mock" group, perhaps that's the missing link. _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRupkKLJP96aW75pIOKYPgoojZS4gUCZYy53QAKCRCKYPgoojZS 4iA8AP9qguBoCkZWhcynhHLQ55q41rB9EalBFBiC/5RVXsbbhwD/bvAQpeAFxeTL J/9hX3Fx01BT4JAefDcFS53hp4ruUQg= =zy2z -----END PGP SIGNATURE-----