Subject: Re: unpriviledged build + parallel builds
To: None <tech-pkg@NetBSD.org>
From: Jeremy C. Reed <email@example.com>
Date: 06/03/2005 10:12:59
On Fri, 3 Jun 2005, Hubert Feyrer wrote:
> On Fri, 3 Jun 2005, Jeremy C. Reed wrote:
> > Unprivileged builds basically is just doing bulk builds without superuser
> > permission and then slowly fixing every package that is broken. I see this
> > as a time consuming and tedious process, but definitely worth it.
> Close: unprivileged builds are getting a "make install" done properly
> first, probably by using the same tricks as NetBSD's build framework.
> Then get a "make package" DTRT. Then do the bulk build as usual.
I just use the bulk builds framework myself because it made it easy for
trying many packages and then also saving the build logs for the failures.
But now I recall I did do a few changes to mk/bulk so I could run as
non-root -- such as not attempting to remove many directories (since I
didn't have permission in the first place).
And yes, bulk builds do identify other problems too.
> Things to consider:
> * how/where to install dependencies? (esp. bulk build code uses
> binary pkgs where possible!)
I installed to my home directory.
> * how to install files with "special" permissions, e.g. setuid-root,
> on "make install"?
Yes, those were things to fix.
> * how to create proper binary pkgs on "make package"?
That is one problem, because my packages had hard-coded my "home"
directory in them.
> * How to handle files that are not installed by install(1), cp(1)
> or similar, I'm esp. thinking of some pkgs that have fancy
> do-install/post-install targets which run application code.
> Firefox comes to mind.
> Some research of all the challenges would be a good first step,
> getting this all in a bulk build is probably the very last thing.
I found it easier to use bulk build versus manually attempting thousands
of packages and it gave me the logs I needed.
Examples of things I found:
install -c -s -o root -g wheel -m 555 bonnie
install: /storage1/home/jreed/pkg/bin/bonnie: chown/chgrp: Operation not
needs to honor ROOT_USER and ROOT_GROUP or BINOWN and BINGRP
/usr/bin/install -c -s rasmol /usr/X11R6/bin/rasmol
install: /usr/X11R6/bin/rasmol: Permission denied
should use pkg/bin
install -c -s -o root -g wheel -m 555 ircomm
install: /storage1/home/jreed/pkg/bin/ircomm: chown/chgrp: Operation not permitted
ROOT_USER and ROOT_GROUP should be honoured
chown 3 /storage1/home/jreed/pkg/share/aegis/en/man5/aeustate.5 && chgrp 3
chown: /storage1/home/jreed/pkg/share/aegis/en/man5/aeustate.5: Operation
What is uid 3 and gid 3?
install -c -o root -g wheel -m 444 avltree.h
install: /storage1/home/jreed/pkg/include/avltree.h: chown/chgrp:
Operation not permitted
doesn't honor ROOT_USER and ROOT_GROUP or other
error copying "./apps/dtplite" to "/usr/local/bin/dtplite": permission
/usr/local/bin is definitely wrong!
+ mkdir -p /usr/X11R6/lib/X11/fonts/jmk
mkdir: /usr/X11R6/lib/X11/fonts/jmk: Permission denied
Doesn't honor xpkgwedge correctly?
(I posted about all these and others before -- I had too many to fix and
and too many to send-pr at that time.)
Looking at my old emails about this, now I see there are many other issues
related to bulk builds but not unprivileged installs that would get in the
way, such as:
install: /storage1/home/jreed/pkg/man/ja_JP.EUC/man1/ack.1: No such file
need to INSTALLATION_DIRS= man/ja_JP.EUC/man1 ?
> Recommended reading:
> * pkgsrc/mk/bsd.pkg.mk
> * pkgsrc/mk/*
> * pkgsrc/mk/*/*
At first I thought the reply was to me. :)
Jeremy C. Reed
BSD News, BSD tutorials, BSD links