Mailinglist Archive: opensuse-packaging (68 mails)
| < Previous | Next > |
Re: [opensuse-packaging] cleaning the buildroot correctly
- From: Robert Schiele <rschiele@xxxxxxxxx>
- Date: Thu, 15 Feb 2007 15:27:39 +0100
- Message-id: <20070215142739.GR25943@xxxxxxxxxxxxxxxxxx>
On Thu, Feb 15, 2007 at 02:31:29PM +0100, andreas.hanke@xxxxxxxxxxxxxx wrote:
> Hi,
>
> > If somebody has created $RPM_BUILD_ROOT as a symlink that points to
> > your home dir, then
> >
> > rm -rf $RPM_BUILD_ROOT
> >
> > will be save, as it either removes the symlink or fails if you don't
> > have permission to remove it, but
> >
> > rm -rf $RPM_BUILD_ROOT/*
> >
> > will "clean up" your home dir.
>
> If somebody has created $RPM_BUILD_ROOT as a symlink, %build will correct that securely:
>
> + /bin/rm -rf /var/tmp/gnucash-docs-2.0.1-build
> ++ dirname /var/tmp/gnucash-docs-2.0.1-build
> + /bin/mkdir -p /var/tmp
> + /bin/mkdir /var/tmp/gnucash-docs-2.0.1-build
Well, if you rely on this then there is no point in the above command anyway.
Robert
--
Robert Schiele
Dipl.-Wirtsch.informatiker mailto:rschiele@xxxxxxxxx
"Quidquid latine dictum sit, altum sonatur."
> Hi,
>
> > If somebody has created $RPM_BUILD_ROOT as a symlink that points to
> > your home dir, then
> >
> > rm -rf $RPM_BUILD_ROOT
> >
> > will be save, as it either removes the symlink or fails if you don't
> > have permission to remove it, but
> >
> > rm -rf $RPM_BUILD_ROOT/*
> >
> > will "clean up" your home dir.
>
> If somebody has created $RPM_BUILD_ROOT as a symlink, %build will correct that securely:
>
> + /bin/rm -rf /var/tmp/gnucash-docs-2.0.1-build
> ++ dirname /var/tmp/gnucash-docs-2.0.1-build
> + /bin/mkdir -p /var/tmp
> + /bin/mkdir /var/tmp/gnucash-docs-2.0.1-build
Well, if you rely on this then there is no point in the above command anyway.
Robert
--
Robert Schiele
Dipl.-Wirtsch.informatiker mailto:rschiele@xxxxxxxxx
"Quidquid latine dictum sit, altum sonatur."
| < Previous | Next > |