NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc build server



04.07.2020 19:51, Mayuresh пишет:
On Sat, Jul 04, 2020 at 07:07:02PM +0300, Dima Veselov wrote:
Is there an opportunity to build a package with dependencies
on production server without installing all dependencies?
Maybe we can deploy NetBSD dist into a directory and build
pkgsrc in chroot environment or there is more smooth
way to do that?

If that suits you, and if available for your platform, you can use binary
installation - at least for lower level packages. Only thing to watch is
for all the dependencies your and binary distribution's configuration
options are same.

Good example I had started to concern was building SOGo (not built in
pkgsrc releases) which also depend on LLVM/cLang 10 in pkgsrc-current,
but only 9 is available in 2020Q1. I tried to build it on VM and this was
quite a mistake - it took several days and about 5 Gb to complete.

Anyway binary installation of underlying packages takes lot of time
of me and hit the versions difference between -current and last
release. Maybe I should try nightly pkgsrc builds?

My pkgsrc tree and DISTDIR are separated on NFS shares available
for all used servers.

What I want is to run "make install" on fast real production server
with lot of resources once and then have all of those packages built in
NFS DISTDIR so any VM can just install them.

- Check out from CVS or if you are using git, use --depth 1 to keep source
   size less.

I am using CVS and keep pkgsrc tree on NFS apart from build directory.

- Use make update. This reduces space requirements drastically by cleaning
   each work area on each package's installation.

Thats a good point, thanks.

- Delete distfiles.

In mentioned SOGo build I had to delete distfiles between dependencies when
they were failing because of space. :-)

- If possible, store packages away on some other server if you are using
   the build server only for build and consumers of the packages are
   different machines. You can possibly use NFS mount for that.

This is also done.

- The only concern I don't have a good answer to (others can suggest) is
   trimming the pkg space. Here the server is exclusively a build server
   and packages aren't used here. When required for build, it should be
   possible for the system to install from packages (unless version/
   configuration has changed). Not aware if there is a way to manage that.

Sorry if my original question wasn't certain enough. There is no need to
shrink building space. I can give unlimited space and lot of resources to
build process, but I have it only on production servers and I don't want
to mess them with packages they do not need.

   It's a bit complex as you'd not want all packages to be deleted by
   default. But even assuming you supply that list manually, can pkgsrc
   install them on demand and uninstall afterwards automatically?

That is possible, but I am very afraid of a mess leaved afterwards and also
build server can have its own needs interfering with what it compile.

--
Dima Veselov
Physics R&D Establishment of Saint-Petersburg University


Home | Main Index | Thread Index | Old Index