linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
@ 2013-08-17 19:28 Uwe Kleine-König
  2013-08-17 19:32 ` Marc Kleine-Budde
  0 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2013-08-17 19:28 UTC (permalink / raw)
  To: linux-can

For creating a Debian package providing PREFIX and DESTDIR via the
environment is the easiest option. So use ?= to assign these two
variables to honor the values in the environment.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c3e6d9c..2f79ee7 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,8 @@
 #
 #  Send feedback to <linux-can@vger.kernel.org>
 
-DESTDIR =
-PREFIX = /usr/local
+DESTDIR ?=
+PREFIX ?= /usr/local
 
 MAKEFLAGS = -k
 
-- 
1.8.4.rc0


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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-17 19:28 [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment Uwe Kleine-König
@ 2013-08-17 19:32 ` Marc Kleine-Budde
  2013-08-18 11:02   ` Oliver Hartkopp
  0 siblings, 1 reply; 11+ messages in thread
From: Marc Kleine-Budde @ 2013-08-17 19:32 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-can

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

On 08/17/2013 09:28 PM, Uwe Kleine-König wrote:
> For creating a Debian package providing PREFIX and DESTDIR via the
> environment is the easiest option. So use ?= to assign these two
> variables to honor the values in the environment.

I suggest to use autotools.

./configure && make && make install

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-17 19:32 ` Marc Kleine-Budde
@ 2013-08-18 11:02   ` Oliver Hartkopp
  2013-08-18 20:49     ` Uwe Kleine-König
  0 siblings, 1 reply; 11+ messages in thread
From: Oliver Hartkopp @ 2013-08-18 11:02 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: Uwe Kleine-König, linux-can

On 17.08.2013 21:32, Marc Kleine-Budde wrote:
> On 08/17/2013 09:28 PM, Uwe Kleine-König wrote:
>> For creating a Debian package providing PREFIX and DESTDIR via the
>> environment is the easiest option. So use ?= to assign these two
>> variables to honor the values in the environment.
> 
> I suggest to use autotools.
> 
> ./configure && make && make install
> 

Today i like the possibility to use autotools or just to say 'make && make
install' without autotools.

You may choose for the Debian package the build process which is more appropriate.

>
> -DESTDIR =
> -PREFIX = /usr/local
> +DESTDIR ?=
> +PREFIX ?= /usr/local
>

1. good idea - I already pushed it to the git tree

2. I wonder if we should doublecheck the target directories when making it a
real Debian package

e.g. the majority of tools should go into /usr/bin then

But some tools that require root rights should go to /usr/sbin like cangw,
isotptun, slcan_attach, slcand

Or should they stay in /usr/bin and lead to an error when the admin rights are
not granted??

BR,
Oliver




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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-18 11:02   ` Oliver Hartkopp
@ 2013-08-18 20:49     ` Uwe Kleine-König
  2013-08-18 21:36       ` Marc Kleine-Budde
  0 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2013-08-18 20:49 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: Marc Kleine-Budde, linux-can

On Sun, Aug 18, 2013 at 01:02:29PM +0200, Oliver Hartkopp wrote:
> On 17.08.2013 21:32, Marc Kleine-Budde wrote:
> > On 08/17/2013 09:28 PM, Uwe Kleine-König wrote:
> >> For creating a Debian package providing PREFIX and DESTDIR via the
> >> environment is the easiest option. So use ?= to assign these two
> >> variables to honor the values in the environment.
> > 
> > I suggest to use autotools.
> > 
> > ./configure && make && make install
> > 
> 
> Today i like the possibility to use autotools or just to say 'make && make
> install' without autotools.
> 
> You may choose for the Debian package the build process which is more appropriate.
> 
> >
> > -DESTDIR =
> > -PREFIX = /usr/local
> > +DESTDIR ?=
> > +PREFIX ?= /usr/local
> >
> 
> 1. good idea - I already pushed it to the git tree
Thanks, but you somehow messed up the attribution. All three patches I
sent in the last few days appear with author=you :-(

> 2. I wonder if we should doublecheck the target directories when making it a
> real Debian package
> 
> e.g. the majority of tools should go into /usr/bin then
> 
> But some tools that require root rights should go to /usr/sbin like cangw,
> isotptun, slcan_attach, slcand
I don't feel qualified to judge that. The File Heirarchy Standard says
(http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE16):

	Utilities used for system administration (and other root-only
	commands) are stored in /sbin, /usr/sbin, and /usr/local/sbin.
	/sbin contains binaries essential for booting, restoring,
	recovering, and/or repairing the system in addition to the
	binaries in /bin.


> Or should they stay in /usr/bin and lead to an error when the admin rights are
> not granted??
Even if they are in /usr/sbin they should lead to an error in that case.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-18 20:49     ` Uwe Kleine-König
@ 2013-08-18 21:36       ` Marc Kleine-Budde
  2013-08-19  8:24         ` Marc Kleine-Budde
  2013-08-19  8:37         ` Uwe Kleine-König
  0 siblings, 2 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2013-08-18 21:36 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Oliver Hartkopp, linux-can

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

On 08/18/2013 10:49 PM, Uwe Kleine-König wrote:
[...]

>> 1. good idea - I already pushed it to the git tree
> Thanks, but you somehow messed up the attribution. All three patches I
> sent in the last few days appear with author=you :-(

We can force-push-fix that :)

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-18 21:36       ` Marc Kleine-Budde
@ 2013-08-19  8:24         ` Marc Kleine-Budde
  2013-08-19  8:37         ` Uwe Kleine-König
  1 sibling, 0 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2013-08-19  8:24 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Oliver Hartkopp, linux-can

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

On 08/18/2013 11:36 PM, Marc Kleine-Budde wrote:
> On 08/18/2013 10:49 PM, Uwe Kleine-König wrote:
> [...]
> 
>>> 1. good idea - I already pushed it to the git tree
>> Thanks, but you somehow messed up the attribution. All three patches I
>> sent in the last few days appear with author=you :-(

In order to apply patches with git, I use:

    git am -s /path/to/path

Then the author is not lost and you are tracked as the committer.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-18 21:36       ` Marc Kleine-Budde
  2013-08-19  8:24         ` Marc Kleine-Budde
@ 2013-08-19  8:37         ` Uwe Kleine-König
  2013-08-19 17:23           ` Oliver Hartkopp
  1 sibling, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2013-08-19  8:37 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: Oliver Hartkopp, linux-can

On Sun, Aug 18, 2013 at 11:36:05PM +0200, Marc Kleine-Budde wrote:
> On 08/18/2013 10:49 PM, Uwe Kleine-König wrote:
> [...]
> 
> >> 1. good idea - I already pushed it to the git tree
> > Thanks, but you somehow messed up the attribution. All three patches I
> > sent in the last few days appear with author=you :-(
> 
> We can force-push-fix that :)
If you want, a command to fix these three commits is:

	git filter-branch --env-filter 'case $GIT_COMMIT in b945b274ae48b48d2d4c21e115da69db1d9ec28a) GIT_AUTHOR_NAME="Uwe Kleine-König"; GIT_AUTHOR_EMAIL="u.kleine-koenig@pengutronix.de"; GIT_AUTHOR_DATE="Thu, 15 Aug 2013 20:59:26 +0200";; 8d5d80d0eae82e345e257a262a1e5b975ba4cbc0) GIT_AUTHOR_NAME="Uwe Kleine-König"; GIT_AUTHOR_EMAIL="u.kleine-koenig@pengutronix.de"; GIT_AUTHOR_DATE="Thu, 15 Aug 2013 22:58:19 +0200";; 903357e71a8994d8a821df6b31b86240f851dec1) GIT_AUTHOR_NAME="Uwe Kleine-König"; GIT_AUTHOR_EMAIL="u.kleine-koenig@pengutronix.de"; GIT_AUTHOR_DATE="Sat, 17 Aug 2013 21:28:10 +0200";; esac' HEAD~4..

That fixes just the author and date of the three commits in master
without changing anything else.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-19  8:37         ` Uwe Kleine-König
@ 2013-08-19 17:23           ` Oliver Hartkopp
  2013-08-19 19:16             ` Marc Kleine-Budde
  0 siblings, 1 reply; 11+ messages in thread
From: Oliver Hartkopp @ 2013-08-19 17:23 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Marc Kleine-Budde, linux-can

On 19.08.2013 10:37, Uwe Kleine-König wrote:
> On Sun, Aug 18, 2013 at 11:36:05PM +0200, Marc Kleine-Budde wrote:
>> On 08/18/2013 10:49 PM, Uwe Kleine-König wrote:
>> [...]
>>
>>>> 1. good idea - I already pushed it to the git tree
>>> Thanks, but you somehow messed up the attribution. All three patches I
>>> sent in the last few days appear with author=you :-(
>>
>> We can force-push-fix that :)
> If you want, a command to fix these three commits is:
> 
> 	git filter-branch --env-filter 'case $GIT_COMMIT in b945b274ae48b48d2d4c21e115da69db1d9ec28a) GIT_AUTHOR_NAME="Uwe Kleine-König"; GIT_AUTHOR_EMAIL="u.kleine-koenig@pengutronix.de"; GIT_AUTHOR_DATE="Thu, 15 Aug 2013 20:59:26 +0200";; 8d5d80d0eae82e345e257a262a1e5b975ba4cbc0) GIT_AUTHOR_NAME="Uwe Kleine-König"; GIT_AUTHOR_EMAIL="u.kleine-koenig@pengutronix.de"; GIT_AUTHOR_DATE="Thu, 15 Aug 2013 22:58:19 +0200";; 903357e71a8994d8a821df6b31b86240f851dec1) GIT_AUTHOR_NAME="Uwe Kleine-König"; GIT_AUTHOR_EMAIL="u.kleine-koenig@pengutronix.de"; GIT_AUTHOR_DATE="Sat, 17 Aug 2013 21:28:10 +0200";; esac' HEAD~4..
> 
> That fixes just the author and date of the three commits in master
> without changing anything else.
> 

Done.

I did not intentionally replace you as author.

When i do a similar commit from a mail, I’ll take care about not loosing the
original author anymore.

Git still is mystic to me 8-)

Best regards,
Oliver



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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-19 17:23           ` Oliver Hartkopp
@ 2013-08-19 19:16             ` Marc Kleine-Budde
  2013-08-20  5:29               ` Oliver Hartkopp
  0 siblings, 1 reply; 11+ messages in thread
From: Marc Kleine-Budde @ 2013-08-19 19:16 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: Uwe Kleine-König, linux-can

[-- Attachment #1: Type: text/plain, Size: 635 bytes --]

On 08/19/2013 07:23 PM, Oliver Hartkopp wrote:
> I did not intentionally replace you as author.
> 
> When i do a similar commit from a mail, I’ll take care about not loosing the
> original author anymore.
> 
> Git still is mystic to me 8-)

If it's okay Oliver, I'm going to force push your branch, so that we
have a clean history again.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-19 19:16             ` Marc Kleine-Budde
@ 2013-08-20  5:29               ` Oliver Hartkopp
  2013-08-20  6:55                 ` Marc Kleine-Budde
  0 siblings, 1 reply; 11+ messages in thread
From: Oliver Hartkopp @ 2013-08-20  5:29 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: Uwe Kleine-König, linux-can

On 19.08.2013 21:16, Marc Kleine-Budde wrote:
> On 08/19/2013 07:23 PM, Oliver Hartkopp wrote:
>> I did not intentionally replace you as author.
>>
>> When i do a similar commit from a mail, I’ll take care about not loosing the
>> original author anymore.
>>
>> Git still is mystic to me 8-)
> 
> If it's okay Oliver, I'm going to force push your branch, so that we
> have a clean history again.
> 

I would appreciate that.

BR,
Oliver



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

* Re: [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment
  2013-08-20  5:29               ` Oliver Hartkopp
@ 2013-08-20  6:55                 ` Marc Kleine-Budde
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2013-08-20  6:55 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: Uwe Kleine-König, linux-can

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

On 08/20/2013 07:29 AM, Oliver Hartkopp wrote:
> On 19.08.2013 21:16, Marc Kleine-Budde wrote:
>> On 08/19/2013 07:23 PM, Oliver Hartkopp wrote:
>>> I did not intentionally replace you as author.
>>>
>>> When i do a similar commit from a mail, I’ll take care about not loosing the
>>> original author anymore.
>>>
>>> Git still is mystic to me 8-)
>>
>> If it's okay Oliver, I'm going to force push your branch, so that we
>> have a clean history again.
>>
> 
> I would appreciate that.

Done. You can bring your local repo into a consistent state with:

    $ pit pull --rebase

If you don't have any patches applied your HEAD should be equal to
origin/master.

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

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

end of thread, other threads:[~2013-08-20  7:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-17 19:28 [PATCH can-utils] Don't overwrite PREFIX and DESTDIR when provided via the environment Uwe Kleine-König
2013-08-17 19:32 ` Marc Kleine-Budde
2013-08-18 11:02   ` Oliver Hartkopp
2013-08-18 20:49     ` Uwe Kleine-König
2013-08-18 21:36       ` Marc Kleine-Budde
2013-08-19  8:24         ` Marc Kleine-Budde
2013-08-19  8:37         ` Uwe Kleine-König
2013-08-19 17:23           ` Oliver Hartkopp
2013-08-19 19:16             ` Marc Kleine-Budde
2013-08-20  5:29               ` Oliver Hartkopp
2013-08-20  6:55                 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).