All of lore.kernel.org
 help / color / mirror / Atom feed
* permissions when installing scripts
@ 2018-10-15 10:11 Belisko Marek
  2018-10-15 12:35 ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Belisko Marek @ 2018-10-15 10:11 UTC (permalink / raw)
  To: yocto

Hi,

I have package which contains bunch of scripts (with +x flag for
user). When installed in do_install method (simply by copying them to
destination) they loose +x flag. I know copying directly is not best
approach but there exists better way how to keep scripts permissions
like in repo (except calling install -m 755 for all of them)? Thanks.

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: permissions when installing scripts
  2018-10-15 10:11 permissions when installing scripts Belisko Marek
@ 2018-10-15 12:35 ` Burton, Ross
  2018-10-15 18:45   ` Bas Mevissen
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2018-10-15 12:35 UTC (permalink / raw)
  To: Belisko Marek; +Cc: Yocto-mailing-list

As you've discovered, cp doesn't preserve permissions.  Using install
-m755 is the idiom.

Ross
On Mon, 15 Oct 2018 at 11:12, Belisko Marek <marek.belisko@gmail.com> wrote:
>
> Hi,
>
> I have package which contains bunch of scripts (with +x flag for
> user). When installed in do_install method (simply by copying them to
> destination) they loose +x flag. I know copying directly is not best
> approach but there exists better way how to keep scripts permissions
> like in repo (except calling install -m 755 for all of them)? Thanks.
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: permissions when installing scripts
  2018-10-15 12:35 ` Burton, Ross
@ 2018-10-15 18:45   ` Bas Mevissen
  2018-10-15 18:53     ` Belisko Marek
  2018-10-15 18:53     ` Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: Bas Mevissen @ 2018-10-15 18:45 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list



cp -a or --preserve(=<something>) optionally combined with other options 
does the trick. However, using install is the better solution.


-- Bas.

On 2018-10-15 14:35, Burton, Ross wrote:
> As you've discovered, cp doesn't preserve permissions.  Using install
> -m755 is the idiom.
> 
> Ross
> On Mon, 15 Oct 2018 at 11:12, Belisko Marek <marek.belisko@gmail.com> 
> wrote:
>> 
>> Hi,
>> 
>> I have package which contains bunch of scripts (with +x flag for
>> user). When installed in do_install method (simply by copying them to
>> destination) they loose +x flag. I know copying directly is not best
>> approach but there exists better way how to keep scripts permissions
>> like in repo (except calling install -m 755 for all of them)? Thanks.
>> 
>> BR,
>> 
>> marek
>> 
>> --
>> as simple and primitive as possible
>> -------------------------------------------------
>> Marek Belisko - OPEN-NANDRA
>> Freelance Developer
>> 
>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> Tel: +421 915 052 184
>> skype: marekwhite
>> twitter: #opennandra
>> web: http://open-nandra.com
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: permissions when installing scripts
  2018-10-15 18:45   ` Bas Mevissen
@ 2018-10-15 18:53     ` Belisko Marek
  2018-10-15 18:53     ` Burton, Ross
  1 sibling, 0 replies; 6+ messages in thread
From: Belisko Marek @ 2018-10-15 18:53 UTC (permalink / raw)
  To: abuse; +Cc: yocto

Hi Bas,

On Mon, Oct 15, 2018 at 8:45 PM Bas Mevissen <abuse@basmevissen.nl> wrote:
>
>
>
> cp -a or --preserve(=<something>) optionally combined with other options
> does the trick. However, using install is the better solution.
But -p will keep current user and not root used when installed in
final rootfs (also QA report warnings about host contamination).
I think I'll stick with install ;). Thanks.
>
>
> -- Bas.
>
> On 2018-10-15 14:35, Burton, Ross wrote:
> > As you've discovered, cp doesn't preserve permissions.  Using install
> > -m755 is the idiom.
> >
> > Ross
> > On Mon, 15 Oct 2018 at 11:12, Belisko Marek <marek.belisko@gmail.com>
> > wrote:
> >>
> >> Hi,
> >>
> >> I have package which contains bunch of scripts (with +x flag for
> >> user). When installed in do_install method (simply by copying them to
> >> destination) they loose +x flag. I know copying directly is not best
> >> approach but there exists better way how to keep scripts permissions
> >> like in repo (except calling install -m 755 for all of them)? Thanks.
> >>
> >> BR,
> >>
> >> marek
> >>
> >> --
> >> as simple and primitive as possible
> >> -------------------------------------------------
> >> Marek Belisko - OPEN-NANDRA
> >> Freelance Developer
> >>
> >> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> >> Tel: +421 915 052 184
> >> skype: marekwhite
> >> twitter: #opennandra
> >> web: http://open-nandra.com
> >> --
> >> _______________________________________________
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto
>

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: permissions when installing scripts
  2018-10-15 18:45   ` Bas Mevissen
  2018-10-15 18:53     ` Belisko Marek
@ 2018-10-15 18:53     ` Burton, Ross
  2018-10-15 19:02       ` Bas Mevissen
  1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2018-10-15 18:53 UTC (permalink / raw)
  To: Bas Mevissen; +Cc: Yocto-mailing-list

cp -a will preserve ownership, which you don't want.

Ross
On Mon, 15 Oct 2018 at 19:45, Bas Mevissen <abuse@basmevissen.nl> wrote:
>
>
>
> cp -a or --preserve(=<something>) optionally combined with other options
> does the trick. However, using install is the better solution.
>
>
> -- Bas.
>
> On 2018-10-15 14:35, Burton, Ross wrote:
> > As you've discovered, cp doesn't preserve permissions.  Using install
> > -m755 is the idiom.
> >
> > Ross
> > On Mon, 15 Oct 2018 at 11:12, Belisko Marek <marek.belisko@gmail.com>
> > wrote:
> >>
> >> Hi,
> >>
> >> I have package which contains bunch of scripts (with +x flag for
> >> user). When installed in do_install method (simply by copying them to
> >> destination) they loose +x flag. I know copying directly is not best
> >> approach but there exists better way how to keep scripts permissions
> >> like in repo (except calling install -m 755 for all of them)? Thanks.
> >>
> >> BR,
> >>
> >> marek
> >>
> >> --
> >> as simple and primitive as possible
> >> -------------------------------------------------
> >> Marek Belisko - OPEN-NANDRA
> >> Freelance Developer
> >>
> >> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> >> Tel: +421 915 052 184
> >> skype: marekwhite
> >> twitter: #opennandra
> >> web: http://open-nandra.com
> >> --
> >> _______________________________________________
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: permissions when installing scripts
  2018-10-15 18:53     ` Burton, Ross
@ 2018-10-15 19:02       ` Bas Mevissen
  0 siblings, 0 replies; 6+ messages in thread
From: Bas Mevissen @ 2018-10-15 19:02 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list


cp --preserve=mode might prevent that.
However, I'm wondering why the +x gets lost in the first place. Normal 
GNU copy seems to copy that flag by default. Even when doing it as root 
using sudo.

Aren't we looking in the wrong place for the executable bit(s) to fall 
off?

-- Bas.


On 2018-10-15 20:53, Burton, Ross wrote:
> cp -a will preserve ownership, which you don't want.
> 
> Ross
> On Mon, 15 Oct 2018 at 19:45, Bas Mevissen <abuse@basmevissen.nl> 
> wrote:
>> 
>> 
>> 
>> cp -a or --preserve(=<something>) optionally combined with other 
>> options
>> does the trick. However, using install is the better solution.
>> 
>> 
>> -- Bas.
>> 
>> On 2018-10-15 14:35, Burton, Ross wrote:
>> > As you've discovered, cp doesn't preserve permissions.  Using install
>> > -m755 is the idiom.
>> >
>> > Ross
>> > On Mon, 15 Oct 2018 at 11:12, Belisko Marek <marek.belisko@gmail.com>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have package which contains bunch of scripts (with +x flag for
>> >> user). When installed in do_install method (simply by copying them to
>> >> destination) they loose +x flag. I know copying directly is not best
>> >> approach but there exists better way how to keep scripts permissions
>> >> like in repo (except calling install -m 755 for all of them)? Thanks.
>> >>
>> >> BR,
>> >>
>> >> marek
>> >>
>> >> --
>> >> as simple and primitive as possible
>> >> -------------------------------------------------
>> >> Marek Belisko - OPEN-NANDRA
>> >> Freelance Developer
>> >>
>> >> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> >> Tel: +421 915 052 184
>> >> skype: marekwhite
>> >> twitter: #opennandra
>> >> web: http://open-nandra.com
>> >> --
>> >> _______________________________________________
>> >> yocto mailing list
>> >> yocto@yoctoproject.org
>> >> https://lists.yoctoproject.org/listinfo/yocto
>> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-15 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 10:11 permissions when installing scripts Belisko Marek
2018-10-15 12:35 ` Burton, Ross
2018-10-15 18:45   ` Bas Mevissen
2018-10-15 18:53     ` Belisko Marek
2018-10-15 18:53     ` Burton, Ross
2018-10-15 19:02       ` Bas Mevissen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.