Mailinglist Archive: opensuse-buildservice (262 mails)

< Previous Next >
Re: [opensuse-buildservice] [osc] patch to support overlay filesystem - RFC
  • From: Luke Imhoff <luke@xxxxxxxx>
  • Date: Fri, 14 Aug 2009 10:54:42 -0500
  • Message-id: <4A8588C2.6030806@xxxxxxxx>
For the paths, before passing to os.path.abspath, you probably want to run it through the expansion os.path.expanduser() to cover ~/foo and os.path.expandvars() to cover $DIR/foo. It's one of the annoyances of os.path that user and environment variable expansion aren't built into abspath.

Jan-Simon Möller wrote:
Am Mittwoch 12 August 2009 15:16:11 schrieben Sie:
Yes, I know about the %setup issue. I haven't found a generic
solution. Also to save the make build products you have to skip %clean
also. The kernel has a non-standard %prep, so it's not the best one to
find a generic solution.

Ok, here we go for your weekend testing fun ...

Attached patches add 3 new options to osc and the build script.

osc build --overlay=<PATH_TO_OVERLAY>

Use case: Exchanging files in the buildroot without packaging them before Like a new qemu-arm. Its mainly useful for altering the chroot for quick tests. It has no effect on builds on the build server.

<PATH_TO_OVERLAY> must contain the exact directory structure e.g.:

<PATH_TO_OVERLAY>/
<PATH_TO_OVERLAY>/usr
<PATH_TO_OVERLAY>/usr/bin
<PATH_TO_OVERLAY>/usr/bin/qemu-arm




osc build --rsync-src=<SOURCE_PATH> --rsync-dest=<DESTINATION_PATH>

Use case: As mentioned by Luke, there's demand for a way of compiling the
sources without tar'ing the tree.

<SOURCE_PATH> is the path on the host filesystem e.g.
/tmp/kerneltree-prepatched
<DESTINATION_PATH> is the path in the chroot e.g.
/usr/src/packages/BUILD/linux-2.6

Additionally it defines "RSYNCDONE 1" so you can catch that in %prep like so:
%prep
%if 0%{?RSYNCDONE}
%setup -n aaa_base -T -D -b 5 -b 7
%else
%setup -n aaa_base -b 5 -b 7
%endif
cd ..
mkdir -p scripts
cp -v %{SOURCE21} scripts
cp -v %{SOURCE22} scripts

Note "-T -D" . This prevents the original tree to be deleted by %setup.

In this example I called osc this way:
osc build standard armv7el aaa_base.spec --rsync-src=./aaa_base
--rsync-dest=/usr/src/packages/BUILD/aaa_base [--noinit]


Have phun!

Best,
Jan-Simon

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups