RFC - Debian patches
Subsystems (2)
Hi guys,
I was asked to look into the patch set Debian carries around to see what we can merge upstream and what not, to try to reduce the delta between distributions and upstream.
This morning I had a very pleasent talk with Bastian Blank (Debian maintainer for lvm2) and this is the full patch queue rebased on latest CVS.
Debian at this point is at 2.02.53 from released tarball.
Bastian gave me explanations on all the patches.
This patch set is neutral (it means I am not asking inclusion of any patch right away) but only review of ideas and possible bug fixes behind the patches.
Once we settled on what patches could be included and what changes need to be done to merge them upstream, we will take appropriate steps, with repost and extra review, etc.
Thanks
Fabio
PATCH 1/11 debian: fix library search path in example.conf
this patch is debian specific and sets the library search path to /lib/lvm2 to avoid cluttering /lib
---
:100644 100644 1067665... 46c4dba... M doc/example.conf
doc/example.conf | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
doc/example.conf +1 -1
@@ -312,7 +312,7 @@ global { # Full pathnames can be given. # Search this directory first for shared libraries. - # library_dir = "/lib" + # library_dir = "/lib/lvm2" # The external locking library to load if locking_type is set to 2. # locking_library = "liblvm2clusterlock.so"
Signature · 1 line
1.5.4.3
PATCH 1/11 debian: fix library search path in example.conf
Quoted 2 lines · Fabio M. Di Nitto
this patch is debian specific and sets the library search path to
/lib/lvm2to avoid cluttering /lib
Add configure parm for this and generate example.conf from template?
In fact, it would be useful to know the current 'configure' line that Debian uses.
Alasdair
PATCH 1/11 debian: fix library search path in example.conf
Quoted 8 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
this patch is debian specific and sets the library search path to
/lib/lvm2to avoid cluttering /libAdd configure parm for this and generate example.conf from template?
In fact, it would be useful to know the current 'configure' line that Debian uses.
I think this patch is bogus even in Debian.
After some investigation "/lib/lvm2/" used to be the default for Debian up to version 2.00.32-1 and then it was reverted to upstream default to fix bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287042
Other than the example config file there are no traces of /lib/lvm2 anywhere in the package.
I attached debian/rules anyway as it could be helpful for other patches.
Fabio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rules
Type: text/x-makefile
Size: 9017 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20091011/542b5fd9/attachment.bin>
PATCH 1/11 debian: fix library search path in example.conf
Quoted 2 lines · Fabio M. Di Nitto
Other than the example config file there are no traces of
/lib/lvm2anywhere in the package.
Its currently unused. The cluster locking lib was the only used external lib.
Bastian
Signature · 2 lines
The sight of death frightens them [Earthers]. -- Kras the Klingon, "Friday's Child", stardate 3497.2
PATCH 1/11 debian: fix library search path in example.conf
Quoted 6 lines · Bastian Blank
Quoted 2 lines · Fabio M. Di Nitto
Other than the example config file there are no traces of
/lib/lvm2anywhere in the package.Its currently unused. The cluster locking lib was the only used external lib.
Alasdair, given that cluster locking lib is gone, do we have a use case to keep this option configurable? If so I'll spend sometime to make it a build option, otherwise I would suggest to simply drop it from the example.conf.
Fabio
PATCH 1/11 debian: fix library search path in example.conf
Quoted 6 lines · Fabio M. Di Nitto
Quoted 2 lines · Bastian Blank
Its currently unused. The cluster locking lib was the only used external lib.
Alasdair, given that cluster locking lib is gone, do we have a use case to keep this option configurable?
It's used for all lvm2 external libraries and needs to stay. The commented-out example is only worth making configurable if people are actually installing libraries into private directories (and arguably it should then be hard-coded into the source too).
We only stopped building the cluster locking library externally on Red Hat distributions because of some complexities of the Red Hat build system. If they get resolved (as I hope they will be with RHEL6) then we will probably reinstate it.
Alasdair
PATCH 1/11 debian: fix library search path in example.conf
Quoted 13 lines · Alasdair G Kergon
Quoted 6 lines · Fabio M. Di Nitto
Quoted 2 lines · Bastian Blank
Its currently unused. The cluster locking lib was the only used external lib.
Alasdair, given that cluster locking lib is gone, do we have a use case to keep this option configurable?
It's used for all lvm2 external libraries and needs to stay. The commented-out example is only worth making configurable if people are actually installing libraries into private directories (and arguably it should then be hard-coded into the source too).
Quoted 5 lines
We only stopped building the cluster locking library externally on Red Hat distributions because of some complexities of the Red Hat build system. If they get resolved (as I hope they will be with RHEL6) then we will probably reinstate it.
The patch in attachment:
- allows lvm2libdir to be configurable
- dynamically update docs and man pages
- changes get_shared_library_path to understand LVM2_LIB_DIR
- make get_shared_library_path returns error (void to int)
- update get_shared_library_path users
Fabio
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lvm2libdir.diff
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20091109/2204a72c/attachment.ksh>
PATCH 1/11 debian: fix library search path in example.conf
Quoted 19 lines · Fabio M. Di Nitto
Quoted 12 lines · Alasdair G Kergon
Quoted 6 lines · Fabio M. Di Nitto
Quoted 2 lines · Bastian Blank
Its currently unused. The cluster locking lib was the only used external lib.
Alasdair, given that cluster locking lib is gone, do we have a use case to keep this option configurable?
It's used for all lvm2 external libraries and needs to stay. The commented-out example is only worth making configurable if people are actually installing libraries into private directories (and arguably it should then be hard-coded into the source too).
Quoted 5 lines
We only stopped building the cluster locking library externally on Red Hat distributions because of some complexities of the Red Hat build system. If they get resolved (as I hope they will be with RHEL6) then we will probably reinstate it.
Quoted 10 lines
The patch in attachment:
- allows lvm2libdir to be configurable
- dynamically update docs and man pages
- changesget_shared_library_pathto understandLVM2_LIB_DIR
- makeget_shared_library_pathreturns error (void to int)
- updateget_shared_library_pathusersFabio
I just realized that the patch doesn?t show properly the rename of doc/example.conf to doc/example.conf.in. Just a minor detail.
Fabio
RFC - Debian patches (resend - one more time)
Sorry for the repost.. there has been some technical issues with SMTP server
PATCH 2/11 debian: drop realtime
the realtime support is completely unused and just includes another library dependency
---
:100644 100644 b4e7f28... 45dc2c9... M configure.in
:100644 100644 2bd6fba... d4e24d4... M lib/Makefile.in
:100644 000000 62e1be8... 0000000... D lib/misc/timestamp.c
:100644 000000 50e2a85... 0000000... D lib/misc/timestamp.h
configure.in | 23 --------- lib/Makefile.in | 1 - lib/misc/timestamp.c | 130 -------------------------------------------------- lib/misc/timestamp.h | 33 ------------- 4 files changed, 0 insertions(+), 187 deletions(-)
configure.in +0 -23
@@ -40,7 +40,6 @@ case "$host_os" in ODIRECT=yes DM_IOCTLS=yes SELINUX=yes - REALTIME=yes CLUSTER=internal FSADM=yes ;;
@@ -55,7 +54,6 @@ case "$host_os" in ODIRECT=no DM_IOCTLS=no SELINUX=no - REALTIME=no CLUSTER=none FSADM=no ;;
@@ -316,13 +314,6 @@ AC_ARG_ENABLE([readline], AC_MSG_RESULT($READLINE) ################################################################################ -dnl -- Disable realtime clock support -AC_MSG_CHECKING(whether to enable realtime support) -AC_ARG_ENABLE(realtime, [ --disable-realtime Disable realtime clock support], -REALTIME=$enableval) -AC_MSG_RESULT($REALTIME) - -################################################################################ dnl -- Init pkg-config with dummy invokation: dnl -- this is required because PKG_CHECK_MODULES macro is expanded dnl -- to initialize the pkg-config environment only at the first invokation,
@@ -868,19 +859,6 @@ if test x$SELINUX = xyes; then fi ################################################################################ -dnl -- Check for realtime clock support -if test x$REALTIME = xyes; then - AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no) - - if test x$HAVE_REALTIME = xyes; then - AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.]) - LIBS="-lrt $LIBS" - else - AC_MSG_WARN(Disabling realtime clock) - fi -fi - -################################################################################ dnl -- Check for getopt AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
@@ -1098,7 +1076,6 @@ AC_SUBST(GROUP) AC_SUBST(GULM_CFLAGS) AC_SUBST(GULM_LIBS) AC_SUBST(HAVE_LIBDL) -AC_SUBST(HAVE_REALTIME) AC_SUBST(HAVE_SELINUX) AC_SUBST(INTL) AC_SUBST(INTL_PACKAGE)
lib/Makefile.in +0 -1
@@ -82,7 +82,6 @@ SOURCES =\ misc/lvm-globals.c \ misc/lvm-string.c \ misc/lvm-wrappers.c \ - misc/timestamp.c \ misc/util.c \ mm/memlock.c \ report/report.c \
lib/misc/timestamp.c deleted +0 -130
130 lines not on this page · raw message
lib/misc/timestamp.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* Copyright (C) 2006 Rackable Systems All rights reserved. -* -* This file is part of LVM2. -* -* This copyrighted material is made available to anyone wishing to use, -* modify, copy, or redistribute it subject to the terms and conditions -* of the GNU Lesser General Public License v.2.1. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef _LVM_TIMESTAMP_H -#define _LVM_TIMESTAMP_H - -struct timestamp ; - -struct timestamp *get_timestamp (void ); - -/* cmp_timestamp: Compare two timestamps -* -* Return: -1 if t1 is less than t2 -* 0 if t1 is equal to t2 -* 1 if t1 is greater than t2 -*/ -int cmp_timestamp (struct timestamp *t1,struct timestamp *t2); - -void destroy_timestamp (struct timestamp *t); - -#endif /* _LVM_TIMESTAMP_H */ -
Signature · 1 line
1.5.4.3
PATCH 2/11 debian: drop realtime
Quoted 2 lines · Fabio M. Di Nitto
the realtime support is completely unused and just includes another library dependency
Just fix the build so REALTIME=no really does exclude it completely.
Alasdair
PATCH 2/11 debian: drop realtime
Quoted 4 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
the realtime support is completely unused and just includes another library dependency
Just fix the build so REALTIME=no really does exclude it completely.
The code is not used. Why is it there?
Bastian
Signature · 1 line
Warp 7 -- It's a law we can live with.
PATCH 2/11 debian: drop realtime
Quoted 1 line · Bastian Blank
The code is not used. Why is it there?
This is an upstream development tree and instead of having multiple branches, we keep the code in one place but exclude or disable code that is not used. The code that needed to use that particular feature has not been finished.
Alasdair
PATCH 2/11 debian: drop realtime
Quoted 5 lines · Alasdair G Kergon
Quoted 1 line · Bastian Blank
The code is not used. Why is it there?
This is an upstream development tree and instead of having multiple branches, we keep the code in one place but exclude or disable code that is not used.
The code
* is enabled by default,
* is unused in the published code since a long time and
* is not marked in any way.
=> Can be removed.
Quoted 2 lines
The code that needed to use that particular feature has
not been finished.
Then it can be handled as part of that particular feature.
Bastian
Signature · 1 line
Well, Jim, I'm not much of an actor either.
PATCH 2/11 debian: drop realtime
Quoted 13 lines · Bastian Blank
Quoted 5 lines · Alasdair G Kergon
Quoted 1 line · Bastian Blank
The code is not used. Why is it there?
This is an upstream development tree and instead of having multiple branches, we keep the code in one place but exclude or disable code that is not used.
The code
* is enabled by default,
* is unused in the published code since a long time and
* is not marked in any way.
=> Can be removed.
Quoted 7 lines
Quoted 2 lines
The code that needed to use that particular feature has
not been finished.Then it can be handled as part of that particular feature.
Bastian
this patch should make everybody happy.
Sets realitime support off by default and still allow to have it configurable for developers.
Fabio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: realtime.diff
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20091011/6d7b145c/attachment.bin>
PATCH 2/11 debian: drop realtime
Quoted 4 lines · Fabio M. Di Nitto
this patch should make everybody happy.
Sets realitime support off by default and still allow to have it configurable for developers.
Committed to cvs with agk ACK.
Fabio
RFC - Debian patches (full set)
I am out of luck today..
PATCH 3/11 debian: force modprobe
From: Fabio M. Di Nitto <[email protected]>
well, a linux system without modprobe can't use any modules. so this just assumes that it is available in a real system
---
:100644 100644 45dc2c9... 06759b6... M configure.in
configure.in | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
configure.in +1 -5
@@ -974,11 +974,7 @@ if test x$UDEV_SYNC = xyes; then fi ################################################################################ -AC_PATH_PROG(MODPROBE_CMD, modprobe) - -if test x$MODPROBE_CMD != x; then - AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.]) -fi +AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["/sbin/modprobe"], [The path to 'modprobe', if available.]) ################################################################################ dnl -- dmeventd pidfile and executable path
Signature · 1 line
1.5.4.3
PATCH 3/11 debian: force modprobe
Quoted 2 lines · Fabio M. Di Nitto
well, a linux system without modprobe can't use any modules. so this just assumes that it is available in a real system
I see no need for this one upstream.
(Things like this are there so the code can be used on some BSD-based systems.)
Alasdair
PATCH 3/11 debian: force modprobe
Quoted 5 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
well, a linux system without modprobe can't use any modules. so this just assumes that it is available in a real system
I see no need for this one upstream.
(Things like this are there so the code can be used on some BSD-based systems.)
modprobe is Linux-only, so this useless.
Bastian
Signature · 2 lines
Earth -- mother of the most beautiful women in the universe. -- Apollo, "Who Mourns for Adonais?" stardate 3468.1
PATCH 4/11 debian: fix implicit pointer
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
not sure why the ifdef does not fire, but this is a readline function and must not be redefined
---
:100644 100644 e1f7900... 257cc40... M tools/lvm.c
tools/lvm.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
tools/lvm.c +0 -3
@@ -25,9 +25,6 @@ int main(int argc, char **argv)# include <readline/readline.h> # include <readline/history.h> -# ifndef HAVE_RL_COMPLETION_MATCHES -# define rl_completion_matches (a, b) completion_matches((char *)a, b) -# endif static struct cmdline_context *_cmdline;
Signature · 1 line
1.5.4.3
PATCH 4/11 debian: fix implicit pointer
Quoted 2 lines · Fabio M. Di Nitto
not sure why the ifdef does not fire, but this is a readline function and must not be redefined
This hack was needed for compilation on some systems (functions renamed in library).
If there are other systems where it causes problems, then please send details.
Alasdair
PATCH 4/11 debian: fix implicit pointer
Quoted 9 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
not sure why the ifdef does not fire, but this is a readline function and must not be redefined
This hack was needed for compilation on some systems (functions renamed in library).
If there are other systems where it causes problems, then please send details.
This might very well be a bug in Debian toolchain/autotools/readline because I can't trigger it on any of my systems.
Bastian, I'd like to investigate this further. Can you please me provide me with details of your test machine? Debian SID? x86? x86_64? tool chain version? etc.
Thanks
Fabio
PATCH 4/11 debian: fix implicit pointer
Quoted 3 lines · Fabio M. Di Nitto
Bastian, I'd like to investigate this further. Can you please me provide me with details of your test machine? Debian SID? x86?
x86_64? tool chain version? etc.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516867
https://buildd.debian.org/fetch.cgi?&pkg=lvm2&ver=2.02.44-1&arch=ia64&stamp=1235444991&file=log
Actually configure was not able to find rl_completion_matches but it was usable.
Bastian
Signature · 1 line
Warp 7 -- It's a law we can live with.
PATCH 4/11 debian: fix implicit pointer
Quoted 10 lines · Bastian Blank
Quoted 3 lines · Fabio M. Di Nitto
Bastian, I'd like to investigate this further. Can you please me provide me with details of your test machine? Debian SID? x86?
x86_64? tool chain version? etc.http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516867
https://buildd.debian.org/fetch.cgi?&pkg=lvm2&ver=2.02.44-1&arch=ia64&stamp=1235444991&file=logActually configure was not able to find
rl_completion_matchesbut it was usable.
This seems to be a bug introduced by Debian autoreconf.
Using upstream configure:
configure:13440: checking for rl_completion_matches
configure:13496: gcc -o conftest -Wl,--export-dynamic conftest.c
-lreadline -lrt -lselinux -lsepol -ldl -lncurses >&5 configure:13503: $? = 0
configure:13525: result: yes
Using Debian regenerated configure:
configure:8220: checking for rl_completion_matches
configure:8220: gcc -o conftest -g -O2 conftest.c -ldl >&5/tmp/ccUvvocx.o: In function `main':/root/lvm2-2.02.53/debian/build/build-deb/conftest.c:142: undefined reference to
`rl_completion_matches'
collect2: ld returned 1 exit status
configure:8220: $? = 1
Maybe it's a regression introduced by autoconf 2.64 that's not available in Fedora yet.
Fabio
PATCH 4/11 debian: fix implicit pointer
In reply to Bastian BlankQuoted 10 lines · Bastian Blank
Quoted 3 lines · Fabio M. Di Nitto
Bastian, I'd like to investigate this further. Can you please me provide me with details of your test machine? Debian SID? x86?
x86_64? tool chain version? etc.http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516867
https://buildd.debian.org/fetch.cgi?&pkg=lvm2&ver=2.02.44-1&arch=ia64&stamp=1235444991&file=logActually configure was not able to find
rl_completion_matchesbut it was usable.
Found it...
The regression comes from libs-cleanup.patch:
- AC_CHECK_LIB([readline], [readline], , [rl_found=no])
+ AC_CHECK_LIB([readline], [readline], [LIBS_READLINE="-lreadline
$LIBS_READLINE"], [rl_found=no])
by overriding default [ACTION-IF-FOUND], -lreadline is not part of LIBS= that's used later on by AC_CHECK_FUNC and the test fails.
Fabio
PATCH 5/11 debian: keep libdm-abi consistent
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
don't change the ABI of libdm on selinux enable, just make the selinux function a NOP
Also noted by Alasdair that some other feature set affects the libdm ABI.
---
:100644 100644 e412cff... 6e4f91a... M lib/activate/fs.c
:100644 100644 175d8d1... 248d3ac... M libdm/libdm-common.c
lib/activate/fs.c | 2 -- libdm/libdm-common.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-)
lib/activate/fs.c +0 -2
@@ -201,10 +201,8 @@ static int _mk_link(const char *dev_dir, const char *vg_name,return 0 ; } -#ifdef HAVE_SELINUX if (!dm_set_selinux_context (lv_path,S_IFLNK )) return_0; -#endif return 1 ; }
libdm/libdm-common.c +2 -4
@@ -373,9 +373,9 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,return 1 ; } -#ifdef HAVE_SELINUX int dm_set_selinux_context (const char *path,mode_t mode) { +#ifdef HAVE_SELINUX security_context_t scontext;if (is_selinux_enabled () <=0 )
@@ -396,9 +396,9 @@ int dm_set_selinux_context(const char *path, mode_t mode) }freecon (scontext); +#endif return 1 ; } -#endif static int _add_dev_node (const char *dev_name,uint32_t major,uint32_t minor,uid_t uid,gid_t gid,mode_t mode)
@@ -445,10 +445,8 @@ static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor,log_debug ("Created %s" , path); -#ifdef HAVE_SELINUX if (!dm_set_selinux_context (path,S_IFBLK ))return 0 ; -#endif return 1 ; }
Signature · 1 line
1.5.4.3
PATCH 5/11 debian: keep libdm-abi consistent
Quoted 2 lines · Fabio M. Di Nitto
don't change the ABI of libdm on selinux enable, just make the selinux function a NOP
Clearly this needs fixing upstream.
Alasdair
PATCH 5/11 debian: keep libdm-abi consistent
Quoted 5 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
don't change the ABI of libdm on selinux enable, just make the selinux function a NOP
Clearly this needs fixing upstream.
I have merged this one in CVS.
It appears to be the only bit missing from libdm to retain ABI consistency.
Fabio
PATCH 6/11 debian/ubuntu: make the device node creation more atomic
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455745
---
:100644 100644 248d3ac... 90e0907... M libdm/libdm-common.c
libdm/libdm-common.c | 32 ++++++++++++++++++++++++-------- 1 files changed, 24 insertions(+), 8 deletions(-)
libdm/libdm-common.c +24 -8
@@ -403,12 +403,19 @@ int dm_set_selinux_context(const char *path, mode_t mode)static int _add_dev_node (const char *dev_name,uint32_t major,uint32_t minor,uid_t uid,gid_t gid,mode_t mode) { -char path[PATH_MAX ]; +char path[PATH_MAX ], tmppath[PATH_MAX ];struct stat info;dev_t dev =MKDEV (major, minor);mode_t old_mask;_build_dev_path (path,sizeof (path), dev_name); +_build_dev_path (tmppath,sizeof (tmppath),".XXXXXX" ); + +mktemp (tmppath); +if (strlen (tmppath) ==0 ) { +log_error ("Unable to create name of temporary file" ); +return 0 ; + }if (stat (path, &info) >=0 ) {if (!S_ISBLK (info.st_mode)) {
@@ -431,24 +438,33 @@ static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor, "node creation.", path); old_mask =umask (0 ); -if (mknod (path,S_IFBLK | mode, dev) <0 ) { +if (mknod (tmppath,S_IFBLK | mode, dev) <0 ) {umask (old_mask);log_error ("Unable to make device node for '%s'" , dev_name); -return 0 ; + goto error; }umask (old_mask); -if (chown (path, uid, gid) <0 ) { +if (chown (tmppath, uid, gid) <0 ) {log_sys_error ("chown" , path); -return 0 ; + goto error; } -log_debug ("Created %s" , path); +if (!dm_set_selinux_context (tmppath,S_IFBLK )) + goto error; -if (!dm_set_selinux_context (path,S_IFBLK )) -return 0 ; +if (rename (tmppath, path) <0 ) { +log_error ("Unable to replace device node for '%s'" , dev_name); + goto error; + } + +log_debug ("Created %s" , path);return 1 ; + +error: +unlink (tmppath); +return 0 ; }static int _rm_dev_node (const char *dev_name)
Signature · 1 line
1.5.4.3
PATCH 6/11 debian/ubuntu: make the device node creation more atomic
This one needs a fresh review. (I think I bounced it for further changes when it was originally submitted, but don't recall seeing a revised version.)
Alasdair
PATCH 6/11 debian/ubuntu: make the device node creation more atomic
Quoted 2 lines · Alasdair G Kergon
This one needs a fresh review. (I think I bounced it for further changes when it was originally submitted, but don't recall seeing a revised version.)
Do you have a reference to the original submission? I can't find it on either lvm-devel or linux-lvm mailing lists.
Thanks
Fabio
PATCH 6/11 debian/ubuntu: make the device node creation more atomic
Quoted 2 lines · Fabio M. Di Nitto
Do you have a reference to the original submission? I can't find it on either lvm-devel or linux-lvm mailing lists.
Forwarded. Debian bug 402132.
Alasdair
PATCH 6/11 debian/ubuntu: make the device node creation more atomic
Quoted 5 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
Do you have a reference to the original submission? I can't find it on either lvm-devel or linux-lvm mailing lists.
Forwarded. Debian bug 402132.
The old patch had hardcoded temporary file names.
This new one address the problem by using mktemp(3) and also the only comment you had on the Debian bug.
I think it's safe to pull it in.
Fabio
PATCH 7/11 debian: workaround for broken kernel headers
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
this patch might be debian specific and needs more investigation.
---
:100644 100644 5ba63ce... a8edf55... M libdm/ioctl/libdm-compat.h
:100644 100644 5fcda74... ec990d7... M libdm/misc/kdev_t.h
libdm/ioctl/libdm-compat.h | 5 +++-- libdm/misc/kdev_t.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-)
libdm/ioctl/libdm-compat.h +3 -2
@@ -19,6 +19,7 @@#include "kdev_t.h" #include "dm-ioctl.h" #include <inttypes.h> +#include <linux/types.h> #include <sys/ioctl.h> struct dm_task ;
@@ -40,7 +41,7 @@ struct dm_ioctl_v1 {int32_t open_count;/* out */ uint32_t flags;/* in/out */ -__kernel_dev_t dev;/* in/out */ +devmapper_kernel_dev_t dev;/* in/out */ char name[DM_NAME_LEN ];/* device name */ char uuid[DM_UUID_LEN ];/* unique identifier for
@@ -60,7 +61,7 @@ struct dm_target_spec_v1 {struct dm_target_deps_v1 {uint32_t count; -__kernel_dev_t dev[0 ];/* out */ +devmapper_kernel_dev_t dev[0 ];/* out */ };enum {
libdm/misc/kdev_t.h +4 -0
@@ -15,8 +15,12 @@#ifndef _LIBDM_KDEV_H#define _LIBDM_KDEV_H +#include <linux/types.h> +#define MAJOR (dev) ((dev & 0xfff00) >> 8)#define MINOR (dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00))#define MKDEV (ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12)) +typedef __u32 devmapper_kernel_dev_t ; +#endif
Signature · 1 line
1.5.4.3
PATCH 7/11 debian: workaround for broken kernel headers
Quoted 1 line · Fabio M. Di Nitto
this patch might be debian specific and needs more investigation.
Yes, I'm not sure whether or not it's something we can deal with upstream somehow.
Alasdair
PATCH 7/11 debian: workaround for broken kernel headers
In reply to Fabio M. Di NittoQuoted 5 lines · Fabio M. Di Nitto
From: Fabio M. Di Nitto <[email protected]>
this patch might be debian specific and needs more investigation.
Signed-off-by Fabio M. Di Nitto <[email protected]>
Hi Bastian,
do you recall what kernel version was triggering the issue?
Fabio
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
use selinux pkgconfig file instead of hardcoding the contents
---
:100644 100644 b657090... d4ca036... M libdm/libdevmapper.pc.in
libdm/libdevmapper.pc.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
libdm/libdevmapper.pc.in +1 -1
@@ -8,4 +8,4 @@ Description: device-mapper library Version: @DM_LIB_PATCHLEVEL@ Cflags: -I${includedir} Libs: -L${libdir} -ldevmapper -Libs.private: @SELINUX_LIBS@ +Requires.private: libselinux
Signature · 1 line
1.5.4.3
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
Quoted 1 line · Fabio M. Di Nitto
use selinux pkgconfig file instead of hardcoding the contents
I don't think this patch goes far enough...
The build should be using the pc file too (if present), as we now do for clvmd!
Alasdair
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
Quoted 3 lines · Alasdair G Kergon
Quoted 1 line · Fabio M. Di Nitto
use selinux pkgconfig file instead of hardcoding the contents
I don't think this patch goes far enough...
This is the external view.
Quoted 1 line
The build should be using the pc file too (if present), as we now do for clvmd!
This is the internal view. This are different parts.
Bastian
Signature · 2 lines
Those who hate and fight must stop themselves -- otherwise it is not stopped. -- Spock, "Day of the Dove", stardate unknown
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
In reply to Alasdair G KergonQuoted 5 lines · Alasdair G Kergon
Quoted 1 line · Fabio M. Di Nitto
use selinux pkgconfig file instead of hardcoding the contents
I don't think this patch goes far enough...
The build should be using the pc file too (if present), as we now do for clvmd!
We need to differentiate as Bastian said.
For the internal view, we can switch to use PKG_CONFIG inside our configure.in, but that means:
1) it will be a hard dependency (and we recently agreed to avoid that).
2) we assume that lvm2 developers and packagers will build/ship with recent enough build dependencies to guarantee working pkg-config files.
While I am generally ok with this approach as it will make our configure.in a lot simpler, it will kill the option to build on older distro (I believe we only lose RHEL4 at this point, but it would require cross-checking).
For the external view, as it is now, we can create the correct .pc file. If we detect that selinux has pkg-config support, then we use the "Requires.private: libselinux" that will automatically expand via pkg-config. If we don't have selinux pkg-config, then we can hardcode as we do now.
Fabio
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
Quoted 5 lines · Fabio M. Di Nitto
For the internal view, we can switch to use
PKG_CONFIGinside our configure.in, but that means:
1) it will be a hard dependency (and we recently agreed to avoid that).
2) we assume that lvm2 developers and packagers will build/ship with recent enough build dependencies to guarantee working pkg-config files.
So any switch would still need a fallback for when pkgconfig is not available. (The real question is whether pkgconfig was generally available some time before selinux or not. If it was, then you can argue that everyone with access to selinux also has access to pkgconfig.)
Quoted 5 lines
For the external view, as it is now, we can create the correct .pc file. If we detect that selinux has pkg-config support, then we use the "Requires.private: libselinux" that will automatically expand via pkg-config. If we don't have selinux pkg-config, then we can hardcode as we do now.
Yes.
Alasdair
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
Quoted 4 lines · Alasdair G Kergon
So any switch would still need a fallback for when pkgconfig is not available. (The real question is whether pkgconfig was generally available some time before selinux or not. If it was, then you can argue that everyone with access to selinux also has access to pkgconfig.)
According to the Debian changelog, pkg-config was first usable in 2001, long before selinux was even considered a good idea.
Quoted 6 lines
Quoted 5 lines
For the external view, as it is now, we can create the correct .pc file. If we detect that selinux has pkg-config support, then we use the "Requires.private: libselinux" that will automatically expand via pkg-config. If we don't have selinux pkg-config, then we can hardcode as we do now.
Yes.
Well, libselinux at least ship the file since 1.28.
Bastian
Signature · 2 lines
No one may kill a man. Not for any purpose. It cannot be condoned. -- Kirk, "Spock's Brain", stardate 5431.6
PATCH 8/11 debian: use selinux pkgconfig info instead of hardcoding
In reply to Alasdair G KergonQuoted 11 lines · Alasdair G Kergon
Quoted 5 lines · Fabio M. Di Nitto
For the internal view, we can switch to use
PKG_CONFIGinside our configure.in, but that means:
1) it will be a hard dependency (and we recently agreed to avoid that).
2) we assume that lvm2 developers and packagers will build/ship with recent enough build dependencies to guarantee working pkg-config files.So any switch would still need a fallback for when pkgconfig is not available. (The real question is whether pkgconfig was generally available some time before selinux or not. If it was, then you can argue that everyone with access to selinux also has access to pkgconfig.)
Ok, this will take some more time to be done properly across the board. I don't want to special case every library/pkgconfig in a different way.
Fabio
PATCH 9/11 debian: libs cleanup
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
patch with several changes on how libs are found and used (selinux and readline)
patch is not clean or ready for submission
---
:100644 100644 06759b6... ad871fd... M configure.in
:100644 100644 207c0e2... 2a14ba6... M daemons/dmeventd/Makefile.in
:100644 100644 4273eeb... f20ad5d... M lib/misc/configure.h.in
:100644 100644 6dd25ff... 191e2ae... M libdm/Makefile.in
:100644 100644 6d12920... 5464188... M make.tmpl.in
:100644 100644 5702f4f... 4f8be22... M tools/Makefile.in
configure.in | 57 +++++------------------------------------ daemons/dmeventd/Makefile.in | 2 +- lib/misc/configure.h.in | 14 +++------- libdm/Makefile.in | 4 +- make.tmpl.in | 5 +-- tools/Makefile.in | 14 +++++----- 6 files changed, 23 insertions(+), 73 deletions(-)
configure.in +7 -50
@@ -34,7 +34,6 @@ case "$host_os" in CLDWHOLEARCHIVE="-Wl,-whole-archive" CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" LDDEPS="$LDDEPS .export.sym" - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" LIB_SUFFIX=so DEVMAPPER=yes ODIRECT=yes
@@ -779,24 +778,6 @@ if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; fi; ################################################################################ -dnl -- Check for termcap (Shamelessly copied from parted 1.4.17) -if test x$READLINE != xno; then - AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses termcap termlib], - [tg_found=yes], [tg_found=no]) - test x$READLINE:$tg_found = xyes:no && - AC_MSG_ERROR( -termcap could not be found which is required for the ---enable-readline option (which is enabled by default). Either disable readline -support with --disable-readline or download and install termcap from: - ftp.gnu.org/gnu/termcap -Note: if you are using precompiled packages you will also need the development - package as well (which may be called termcap-devel or something similar). -Note: (n)curses also seems to work as a substitute for termcap. This was - not found either - but you could try installing that as well. -) -fi - -################################################################################ dnl -- Check for dlopen AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
@@ -827,35 +808,9 @@ AC_MSG_RESULT($SELINUX) ################################################################################ dnl -- Check for selinux if test x$SELINUX = xyes; then - AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no) - - if test x$HAVE_SEPOL = xyes; then - AC_DEFINE([HAVE_SEPOL], 1, - [Define to 1 if sepol_check_context is available.]) - SELINUX_LIBS="-lsepol $SELINUX_LIBS" - fi - - AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no) - - if test x$HAVE_SELINUX = xyes; then - AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) - SELINUX_LIBS="-lselinux $SELINUX_LIBS" - else - AC_MSG_WARN(Disabling selinux) - fi - LIBS="$SELINUX_LIBS $LIBS" - - # With --enable-static_link and selinux enabled, linking - # fails on at least Debian unstable due to unsatisfied references - # to pthread_mutex_lock and _unlock. See if we need -lpthread. - if test "$STATIC_LINK-$HAVE_SELINUX" = yes-yes; then - lvm_saved_libs=$LIBS - LIBS="$LIBS -static" - AC_SEARCH_LIBS([pthread_mutex_lock], [pthread], - [test "$ac_cv_search_pthread_mutex_lock" = "none required" || - LIB_PTHREAD=-lpthread]) - LIBS=$lvm_saved_libs - fi + AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) + LIBS_SELINUX="$(pkg-config --libs libselinux)" + LIBS_SELINUX_STATIC="$(pkg-config --libs --static libselinux)" fi ################################################################################
@@ -866,7 +821,7 @@ AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getop dnl -- Check for readline (Shamelessly copied from parted 1.4.17) if test x$READLINE != xno; then rl_found=yes - AC_CHECK_LIB([readline], [readline], , [rl_found=no]) + AC_CHECK_LIB([readline], [readline], [LIBS_READLINE="-lreadline $LIBS_READLINE"], [rl_found=no]) test x$READLINE:$rl_found = xyes:no && AC_MSG_ERROR( GNU Readline could not be found which is required for the
@@ -1078,6 +1033,9 @@ AC_SUBST(INTL_PACKAGE) AC_SUBST(JOBS) AC_SUBST(LDDEPS) AC_SUBST(LIBS) +AC_SUBST(LIBS_READLINE) +AC_SUBST(LIBS_SELINUX) +AC_SUBST(LIBS_SELINUX_STATIC) AC_SUBST(LIB_SUFFIX) AC_SUBST(LOCALEDIR) AC_SUBST(LVM1)
@@ -1105,7 +1063,6 @@ AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) AC_SUBST(STATIC_LINK) AC_SUBST(UDEV_RULES) -AC_SUBST([LIB_PTHREAD]) AC_SUBST(interface) AC_SUBST(kerneldir) AC_SUBST(missingkernel)
daemons/dmeventd/Makefile.in +1 -1
@@ -46,7 +46,7 @@ LIBS += -ldl -ldevmapper -lpthread dmeventd: $(LIB_SHARED) $(VERSIONED_SHLIB) dmeventd.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dmeventd.o \ - -L. -ldevmapper-event $(LIBS) -rdynamic + -L. -ldevmapper-event .PHONY: install_dynamic install_static install_include \ install_pkgconfig install_dmeventd
lib/misc/configure.h.in +4 -10
@@ -120,9 +120,6 @@ /* Define to 1 if you have the <libintl.h> header file. */ #undef HAVE_LIBINTL_H -/* Define to 1 if you have the `readline' library (-lreadline). */ -#undef HAVE_LIBREADLINE - /* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H
@@ -185,9 +182,6 @@ /* Define to 1 if you have the <readline/readline.h> header file. */ #undef HAVE_READLINE_READLINE_H -/* Define to 1 to include support for realtime clock. */ -#undef HAVE_REALTIME - /* Define to 1 if you have the `rl_completion_matches' function. */ #undef HAVE_RL_COMPLETION_MATCHES
@@ -206,9 +200,6 @@ /* Define to 1 if you have the <selinux/selinux.h> header file. */ #undef HAVE_SELINUX_SELINUX_H -/* Define to 1 if sepol_check_context is available. */ -#undef HAVE_SEPOL - /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE
@@ -273,7 +264,7 @@ /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL -/* Define to 1 if `st_rdev' is member of `struct stat'. */ +/* Define to 1 if `struct stat' is a member of `st_rdev'. */ #undef HAVE_STRUCT_STAT_ST_RDEV /* Define to 1 if you have the <syslog.h> header file. */
@@ -410,6 +401,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION
libdm/Makefile.in +2 -2
@@ -35,9 +35,7 @@ SOURCES =\ INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir) -ifeq ("@STATIC_LINK@", "yes") LIB_STATIC = $(interface)/libdevmapper.a -endif ifeq ("@LIB_SUFFIX@","dylib") LIB_SHARED = $(interface)/libdevmapper.dylib
@@ -47,6 +45,8 @@ endif VERSIONED_SHLIB = libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION_DM) LIB_VERSION = $(LIB_VERSION_DM) +LDFLAGS += @LIBS_SELINUX@ + DEFS += -DDM_DEVICE_UID=@DM_DEVICE_UID@ -DDM_DEVICE_GID=@DM_DEVICE_GID@ \ -DDM_DEVICE_MODE=@DM_DEVICE_MODE@
make.tmpl.in +2 -3
@@ -105,7 +105,6 @@ endif #DEFS += -DBOUNDS_CHECK #CFLAGS += -pg -#LDFLAGS += -pg STRIP= #STRIP = -s
@@ -209,13 +208,13 @@ $(TARGETS): $(OBJECTS) ifeq ("@LIB_SUFFIX@","so") $(LIB_SHARED): $(OBJECTS) $(LDDEPS) $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \ - $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@ + $(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $(OBJECTS) -o $@ endif ifeq ("@LIB_SUFFIX@","dylib") $(LIB_SHARED): $(OBJECTS) $(LDDEPS) $(CC) -dynamiclib -dylib_current_version,$(LIB_VERSION) \ - $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@ + $(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $(OBJECTS) -o $@ endif %.so: %.a
tools/Makefile.in +7 -7
@@ -17,8 +17,6 @@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ -LIB_PTHREAD = @LIB_PTHREAD@ - SOURCES =\ dumpconfig.c \ formats.c \
@@ -105,6 +103,9 @@ endif LVMLIBS += -ldevmapper +LDFLAGS_DMSETUP_STATIC = @LIBS_SELINUX_STATIC@ +LDFLAGS_LVM = @LIBS_READLINE@ + DEFS += -DLVM_SHARED_PATH=\"$(exec_prefix)/sbin/lvm\" include ../make.tmpl
@@ -113,22 +114,21 @@ device-mapper: $(TARGETS_DM) dmsetup: dmsetup.o $(top_builddir)/libdm/libdevmapper.$(LIB_SUFFIX) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dmsetup.o \ - -L$(top_builddir)/libdm -ldevmapper $(LIBS) $(LIB_PTHREAD) + -L$(top_builddir)/libdm -ldevmapper $(LIBS) dmsetup.static: dmsetup.o $(interfacedir)/libdevmapper.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dmsetup.o -static \ - -L$(interfacedir) -ldevmapper $(LIBS) \ - $(LIB_PTHREAD) + -L$(interfacedir) -ldevmapper $(LIBS) $(LDFLAGS_DMSETUP_STATIC) all: device-mapper lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) lvm.o \ - $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic + $(LDFLAGS) $(LVMLIBS) $(LIBS) $(LDFLAGS_LVM) -rdynamic lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacedir)/libdevmapper.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) lvm-static.o -static \ - -L$(interfacedir) $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic + -L$(interfacedir) $(LVMLIBS) $(LIBS) -rdynamic liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o cat $(top_builddir)/lib/liblvm-internal.a > $@
Signature · 1 line
1.5.4.3
PATCH 9/11 debian: libs cleanup
Quoted 3 lines · Fabio M. Di Nitto
patch with several changes on how libs are found and used (selinux and readline)
patch is not clean or ready for submission
Yes, this one needs picking through carefully to see what needs changing and then to decide how.
Alasdair
PATCH 10/11 debian: make the subdir recursion -j capable
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
but it removes some dependencies on the way
---
:100644 100644 556d1ff... 2e8a010... M Makefile.in
:100644 100644 5464188... 56dfa8b... M make.tmpl.in
:100644 100644 f0c98fd... f0acb84... M man/Makefile.in
Makefile.in | 27 +---------------------- make.tmpl.in | 64 +++++++++++------------------------------------------- man/Makefile.in | 4 +-- 3 files changed, 15 insertions(+), 80 deletions(-)
Makefile.in +1 -26
@@ -27,7 +27,7 @@ ifeq ("@INTL@", "yes") SUBDIRS += po endif -SUBDIRS += lib tools daemons libdm +SUBDIRS += libdm lib tools daemons ifeq ("@APPLIB@", "yes") SUBDIRS += liblvm
@@ -54,31 +54,6 @@ endif include make.tmpl -libdm: include -lib: libdm -liblvm: lib -daemons: lib tools -tools: lib device-mapper -po: tools daemons - -libdm.device-mapper: include.device-mapper -daemons.device-mapper: libdm.device-mapper -tools.device-mapper: libdm.device-mapper -device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper - -ifeq ("@INTL@", "yes") -lib.pofile: include.pofile -tools.pofile: lib.pofile -daemons.pofile: lib.pofile -po.pofile: tools.pofile daemons.pofile -pofile: po.pofile -endif - -ifneq ("@CFLOW_CMD@", "") -tools.cflow: lib.cflow -cflow: tools.cflow -endif - ifneq ("@CSCOPE_CMD@", "") cscope.out: tools @CSCOPE_CMD@ -b -R
make.tmpl.in +13 -51
90 lines not on this page · raw message
man/Makefile.in +1 -3
@@ -49,9 +49,7 @@ all: man .PHONY: man -device-mapper: $(MAN8DM) - -man: $(MAN5) $(MAN8) $(MAN8CLUSTER) +man: $(MAN5) $(MAN8) $(MAN8CLUSTER) $(MAN8DM) $(MAN5) $(MAN8) $(MAN8CLUSTER): Makefile
Signature · 1 line
1.5.4.3
PATCH 10/11 debian: make the subdir recursion -j capable
Quoted 1 line · Fabio M. Di Nitto
but it removes some dependencies on the way
The tree isn't constructed for a basic recursion mechanism to work properly at the moment, and the inter-dependencies all play a role in coping with whatever configuration and make targets are thrown at it. (Nor does the current setup work perfectly today.)
So let's park this one for now, then include the possibility of moving some files/directories/targets around so a simple recursion mechanism could perhaps be made to cope.
Alasdair
PATCH 10/11 debian: make the subdir recursion -j capable
Quoted 4 lines · Alasdair G Kergon
The tree isn't constructed for a basic recursion mechanism to work properly at the moment, and the inter-dependencies all play a role in coping with whatever configuration and make targets are thrown at it. (Nor does the current setup work perfectly today.)
Even the dependencies reduces it to a simple recursion model. make is simply not able to provide something else if you don't use one large makefile. And it works quite well.
Bastian
Signature · 2 lines
Killing is wrong. -- Losira, "That Which Survives", stardate unknown
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
In reply to Fabio M. Di NittoFrom: Fabio M. Di Nitto <[email protected]>
remove owner and group definitions and install anything writable as mendated by the debian policy
---
:100644 100644 ad871fd... 6b93b77... M configure.in
:100644 100644 dad568e... a6ecfe9... M daemons/clvmd/Makefile.in
:100644 100644 debab27... fa08f03... M daemons/cmirrord/Makefile.in
:100644 100644 2a14ba6... bf71fdb... M daemons/dmeventd/Makefile.in
:100644 100644 581e5ec... b9f6974... M daemons/dmeventd/plugins/mirror/Makefile.in
:100644 100644 823ca3f... a07558e... M daemons/dmeventd/plugins/snapshot/Makefile.in
:100644 100644 b4689af... f589489... M doc/Makefile.in
:100644 100644 e12cc6f... f70adf7... M lib/format1/Makefile.in
:100644 100644 d67c982... 36230f4... M lib/format_pool/Makefile.in
:100644 100644 584c8d6... 8fa8eb6... M lib/locking/Makefile.in
:100644 100644 d5b678b... b7076f7... M lib/mirror/Makefile.in
:100644 100644 3f960fb... 3de0373... M lib/snapshot/Makefile.in
:100644 100644 191e2ae... dea2771... M libdm/Makefile.in
:100644 100644 d9afc40... 5b37426... M liblvm/Makefile.in
:100644 100644 56dfa8b... e4acf88... M make.tmpl.in
:100644 100644 f0acb84... 647488d... M man/Makefile.in
:100644 100644 c9f8400... 12d4489... M po/Makefile.in
:100644 100644 33a10c1... 677f965... M scripts/Makefile.in
:100644 100644 4f8be22... bd834b9... M tools/Makefile.in
:100644 100644 341479f... 8c71c2b... M udev/Makefile.in
configure.in | 29 ------------------------- daemons/clvmd/Makefile.in | 4 +- daemons/cmirrord/Makefile.in | 2 +- daemons/dmeventd/Makefile.in | 10 ++++---- daemons/dmeventd/plugins/mirror/Makefile.in | 2 +- daemons/dmeventd/plugins/snapshot/Makefile.in | 2 +- doc/Makefile.in | 2 +- lib/format1/Makefile.in | 3 +- lib/format_pool/Makefile.in | 3 +- lib/locking/Makefile.in | 3 +- lib/mirror/Makefile.in | 3 +- lib/snapshot/Makefile.in | 3 +- libdm/Makefile.in | 16 ++++--------- liblvm/Makefile.in | 8 +++--- make.tmpl.in | 9 +------- man/Makefile.in | 8 +++--- po/Makefile.in | 4 +- scripts/Makefile.in | 6 ++-- tools/Makefile.in | 16 +++++++------- udev/Makefile.in | 4 +- 20 files changed, 45 insertions(+), 92 deletions(-)
configure.in +0 -29
@@ -141,33 +141,6 @@ dnl -- Prefix is /usr by default, the exec_prefix default is setup later AC_PREFIX_DEFAULT(/usr) ################################################################################ -dnl -- Setup the ownership of the files -AC_MSG_CHECKING(file owner) -OWNER="root" - -AC_ARG_WITH(user, - [ --with-user=USER Set the owner of installed files [[USER=root]] ], - [ OWNER="$withval" ]) -AC_MSG_RESULT($OWNER) - -if test x$OWNER != x; then - OWNER="-o $OWNER" -fi - -################################################################################ -dnl -- Setup the group ownership of the files -AC_MSG_CHECKING(group owner) -GROUP="root" -AC_ARG_WITH(group, - [ --with-group=GROUP Set the group owner of installed files [[GROUP=root]] ], - [ GROUP="$withval" ]) -AC_MSG_RESULT($GROUP) - -if test x$GROUP != x; then - GROUP="-g $GROUP" -fi - -################################################################################ dnl -- Setup device node ownership AC_MSG_CHECKING(device node uid)
@@ -1023,7 +996,6 @@ AC_SUBST(DM_IOCTLS) AC_SUBST(DM_LIB_VERSION) AC_SUBST(DM_LIB_PATCHLEVEL) AC_SUBST(FSADM) -AC_SUBST(GROUP) AC_SUBST(GULM_CFLAGS) AC_SUBST(GULM_LIBS) AC_SUBST(HAVE_LIBDL)
@@ -1049,7 +1021,6 @@ AC_SUBST(LVM_RELEASE) AC_SUBST(LVM_RELEASE_DATE) AC_SUBST(MIRRORS) AC_SUBST(MSGFMT) -AC_SUBST(OWNER) AC_SUBST(PKGCONFIG) AC_SUBST(POOL) AC_SUBST(QUORUM_CFLAGS)
daemons/clvmd/Makefile.in +2 -2
@@ -98,8 +98,8 @@ clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a .PHONY: install_clvmd install_clvmd: $(TARGETS) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clvmd \ - $(usrsbindir)/clvmd + $(INSTALL) -D clvmd \ + $(sbindir)/clvmd install: $(INSTALL_TARGETS)
daemons/cmirrord/Makefile.in +1 -1
@@ -36,5 +36,5 @@ cmirrord: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a $(LVMLIBS) $(LMLIBS) $(LIBS) install: $(TARGETS) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) cmirrord \ + $(INSTALL) -D cmirrord \ $(usrsbindir)/cmirrord
daemons/dmeventd/Makefile.in +5 -5
@@ -66,24 +66,24 @@ install: $(INSTALL_TYPE) install_include install_dmeventd install_device-mapper: $(INSTALL_TYPE) install_include install_dmeventd install_include: - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/libdevmapper-event.h \ + $(INSTALL) -D -m 644 $(srcdir)/libdevmapper-event.h \ $(includedir)/libdevmapper-event.h install_dynamic: libdevmapper-event.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/libdevmapper-event.$(LIB_SUFFIX).$(LIB_VERSION) $(LN_S) -f libdevmapper-event.$(LIB_SUFFIX).$(LIB_VERSION) \ $(libdir)/libdevmapper-event.$(LIB_SUFFIX) install_dmeventd: dmeventd - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$< + $(INSTALL) -D $< $(sbindir)/$< install_pkgconfig: - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper-event.pc \ + $(INSTALL) -D -m 644 libdevmapper-event.pc \ $(usrlibdir)/pkgconfig/devmapper-event.pc install_static: libdevmapper-event.a - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/libdevmapper-event.a.$(LIB_VERSION) $(LN_S) -f libdevmapper-event.a.$(LIB_VERSION) $(libdir)/libdevmapper-event.a
daemons/dmeventd/plugins/mirror/Makefile.in +1 -1
@@ -34,7 +34,7 @@ LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl install_lvm2: libdevmapper-event-lvm2mirror.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/$<.$(LIB_VERSION) $(LN_S) -f $<.$(LIB_VERSION) $(libdir)/$<
daemons/dmeventd/plugins/snapshot/Makefile.in +1 -1
@@ -34,7 +34,7 @@ LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl install_lvm2: libdevmapper-event-lvm2snapshot.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/$<.$(LIB_VERSION) $(LN_S) -f $<.$(LIB_VERSION) $(libdir)/$<
doc/Makefile.in +1 -1
@@ -24,7 +24,7 @@ include ../make.tmpl install_lvm2: $(CONFSRC) @if [ ! -e $(confdir)/$(CONFDEST) ]; then \ echo "Installing $(CONFSRC) as $(confdir)/$(CONFDEST)"; \ - @INSTALL@ -D $(OWNER) $(GROUP) -m 644 $< \ + @INSTALL@ -D $< \ $(confdir)/$(CONFDEST); \ fi
lib/format1/Makefile.in +1 -2
@@ -32,7 +32,6 @@ LIB_VERSION = $(LIB_VERSION_LVM) include ../../make.tmpl install: liblvm2format1.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2format1.so.$(LIB_VERSION) + $(INSTALL) -D $< $(libdir)/liblvm2format1.so.$(LIB_VERSION) $(LN_S) -f liblvm2format1.so.$(LIB_VERSION) $(libdir)/liblvm2format1.so
lib/format_pool/Makefile.in +1 -2
@@ -29,8 +29,7 @@ LIB_VERSION = $(LIB_VERSION_LVM) include ../../make.tmpl install: liblvm2formatpool.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2formatpool.so.$(LIB_VERSION) + $(INSTALL) -D $< $(libdir)/liblvm2formatpool.so.$(LIB_VERSION) $(LN_S) -f liblvm2formatpool.so.$(LIB_VERSION) \ $(libdir)/liblvm2formatpool.so
lib/locking/Makefile.in +1 -2
@@ -25,8 +25,7 @@ LIB_VERSION = $(LIB_VERSION_LVM) include ../../make.tmpl install install_cluster: liblvm2clusterlock.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2clusterlock.so.$(LIB_VERSION) + $(INSTALL) -D $< $(libdir)/liblvm2clusterlock.so.$(LIB_VERSION) $(LN_S) -f liblvm2clusterlock.so.$(LIB_VERSION) \ $(libdir)/liblvm2clusterlock.so
lib/mirror/Makefile.in +1 -2
@@ -25,7 +25,6 @@ LIB_VERSION = $(LIB_VERSION_LVM) include ../../make.tmpl install: liblvm2mirror.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2mirror.so.$(LIB_VERSION) + $(INSTALL) -D $< $(libdir)/liblvm2mirror.so.$(LIB_VERSION) $(LN_S) -f liblvm2mirror.so.$(LIB_VERSION) $(libdir)/liblvm2mirror.so
lib/snapshot/Makefile.in +1 -2
@@ -25,8 +25,7 @@ LIB_VERSION = $(LIB_VERSION_LVM) include ../../make.tmpl install: liblvm2snapshot.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2snapshot.so.$(LIB_VERSION) + $(INSTALL) -D $< $(libdir)/liblvm2snapshot.so.$(LIB_VERSION) $(LN_S) -f liblvm2snapshot.so.$(LIB_VERSION) \ $(libdir)/liblvm2snapshot.so
libdm/Makefile.in +5 -11
@@ -58,11 +58,7 @@ device-mapper: all install_ioctl install_ioctl_static \ install_pkgconfig -INSTALL_TYPE = install_dynamic - -ifeq ("@STATIC_LINK@", "yes") - INSTALL_TYPE += install_static -endif +INSTALL_TYPE = install_dynamic install_static ifeq ("@PKGCONFIG@", "yes") INSTALL_TYPE += install_pkgconfig
@@ -73,7 +69,7 @@ install: $(INSTALL_TYPE) install_include install_device-mapper: install install_include: - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/libdevmapper.h \ + $(INSTALL_DATA) -D $(srcdir)/libdevmapper.h \ $(includedir)/libdevmapper.h install_dynamic: install_ at interface@
@@ -81,19 +77,17 @@ install_dynamic: install_ at interface@ $(libdir)/libdevmapper.$(LIB_SUFFIX) install_static: install_@interface@_static - $(LN_S) -f libdevmapper.a.$(LIB_VERSION_DM) $(libdir)/libdevmapper.a install_ioctl: ioctl/libdevmapper.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION_DM) install_pkgconfig: - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.pc \ + $(INSTALL_DATA) -D libdevmapper.pc \ $(usrlibdir)/pkgconfig/devmapper.pc install_ioctl_static: ioctl/libdevmapper.a - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/libdevmapper.a.$(LIB_VERSION_DM) + $(INSTALL) -D $< $(usrlibdir)/libdevmapper.a $(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_DM): $(interface)/%.$(LIB_SUFFIX) rm -f $@
liblvm/Makefile.in +4 -4
@@ -67,21 +67,21 @@ endif install: $(INSTALL_TYPE) install_include install_include: - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/lvm2app.h $(includedir)/lvm2app.h + $(INSTALL_DATA) -D $(srcdir)/lvm2app.h $(includedir)/lvm2app.h install_dynamic: $(LIB_SHARED) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/$(LIB_SHARED).$(LIB_VERSION_APP) $(LN_S) -f $(LIB_SHARED).$(LIB_VERSION_APP) \ $(libdir)/$(LIB_SHARED) install_static: $(LIB_STATIC) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/$(LIB_STATIC).$(LIB_VERSION_APP) $(LN_S) -f $(LIB_STATIC).$(LIB_VERSION_APP) $(libdir)/$(LIB_STATIC) install_pkgconfig: - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(LIB_NAME).pc \ + $(INSTALL_DATA) -D $(LIB_NAME).pc \ $(usrlibdir)/pkgconfig/lvm2app.pc liblvm.cflow: $(SOURCES)
make.tmpl.in +1 -8
@@ -21,6 +21,7 @@ CC = @CC@ RANLIB = @RANLIB@ SHELL = /bin/sh INSTALL = @INSTALL@ +INSTALL_DATA = $(INSTALL) -m 644 MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ LCOV = @LCOV@
@@ -56,11 +57,6 @@ udevdir = $(DESTDIR)@udevdir@ interface = @interface@ interfacedir = $(top_srcdir)/libdm/$(interface) -# setup misc variables -# define the ownership variables for the binaries and man pages -OWNER = @OWNER@ -GROUP = @GROUP@ - # The number of jobs to run, if blank, defaults to the make standard ifndef MAKEFLAGS MAKEFLAGS = @JOBS@
@@ -106,9 +102,6 @@ endif #CFLAGS += -pg -STRIP= -#STRIP = -s - LVM_VERSION := $(shell cat $(top_srcdir)/VERSION) LIB_VERSION_LVM := $(shell cat $(top_srcdir)/VERSION | \
man/Makefile.in +4 -4
@@ -61,14 +61,14 @@ install_lvm2: @for f in $(MAN8); \ do \ $(RM) $(MAN8DIR)/$$f; \ - @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \ + $(INSTALL_DATA) -D $$f $(MAN8DIR)/$$f; \ done @echo "Installing $(MAN5) in $(MAN5DIR)" @for f in $(MAN5); \ do \ $(RM) $(MAN5DIR)/$$f; \ - @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN5DIR)/$$f; \ + $(INSTALL_DATA) -D $$f $(MAN5DIR)/$$f; \ done install_cluster:
@@ -76,7 +76,7 @@ install_cluster: @for f in $(MAN8CLUSTER); \ do \ $(RM) $(MAN8DIR)/$$f; \ - @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \ + $(INSTALL_DATA) -D $$f $(MAN8DIR)/$$f; \ done install_device-mapper:
@@ -84,7 +84,7 @@ install_device-mapper: @for f in $(MAN8DM); \ do \ $(RM) $(MAN8DIR)/$$f; \ - @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \ + $(INSTALL_DATA) -D $$f $(MAN8DIR)/$$f; \ done install: install_lvm2 install_device-mapper
po/Makefile.in +2 -2
@@ -54,13 +54,13 @@ install: $(TARGETS) @echo Installing translation files in $(localedir) @( \ for lang in $(LANGS); do \ - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \ + $(INSTALL_DATA) -D $$lang.mo \ $(localedir)/$$lang/LC_MESSAGES/lvm2.mo;\ done; \ ) @( \ for lang in $(LANGS); do \ - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \ + $(INSTALL_DATA) -D $$lang.mo \ $(localedir)/$$lang/LC_MESSAGES/device-mapper.mo;\ done; \ )
scripts/Makefile.in +3 -3
@@ -19,12 +19,12 @@ VPATH = @srcdir@ include ../make.tmpl install: - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(srcdir)/lvm_dump.sh \ + $(INSTALL) -D $(srcdir)/lvm_dump.sh \ $(sbindir)/lvmdump - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(srcdir)/vgimportclone.sh \ + $(INSTALL) -D $(srcdir)/vgimportclone.sh \ $(sbindir)/vgimportclone ifeq ("@FSADM@", "yes") - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(srcdir)/fsadm.sh \ + $(INSTALL) -D $(srcdir)/fsadm.sh \ $(sbindir)/fsadm endif
tools/Makefile.in +8 -8
@@ -165,21 +165,21 @@ cflow: lvm.cflow lvm.xref lvm.tree lvm.rtree lvm.rxref endif install_cmdlib_dynamic: liblvm2cmd.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION) $(LN_S) -f liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION) $(libdir)/liblvm2cmd.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/lvm2cmd.h \ + $(INSTALL_DATA) -D $(srcdir)/lvm2cmd.h \ $(includedir)/lvm2cmd.h install_cmdlib_static: liblvm2cmd-static.a - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(libdir)/liblvm2cmd.a.$(LIB_VERSION) $(LN_S) -f liblvm2cmd.a.$(LIB_VERSION) $(libdir)/liblvm2cmd.a - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/lvm2cmd.h \ + $(INSTALL_DATA) -D $(srcdir)/lvm2cmd.h \ $(includedir)/lvm2cmd.h install_tools_dynamic: lvm .commands - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm \ + $(INSTALL) -D lvm \ $(sbindir)/lvm @echo Creating symbolic links for individual commands in $(sbindir) @( \
@@ -190,14 +190,14 @@ install_tools_dynamic: lvm .commands ) install_tools_static: lvm.static - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ + $(INSTALL) -D $< \ $(staticdir)/lvm.static install_dmsetup_dynamic: dmsetup - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$< + $(INSTALL) -D $< $(sbindir)/$< install_dmsetup_static: dmsetup.static - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$< + $(INSTALL) -D $< $(sbindir)/$< install_device-mapper: $(INSTALL_DMSETUP_TARGETS)
udev/Makefile.in +2 -2
@@ -32,7 +32,7 @@ install_lvm2: $(LVM_RULES) @for f in $(LVM_RULES); \ do \ $(RM) $(udevdir)/$$f; \ - $(INSTALL) -c -D $(OWNER) $(GROUP) -m 644 $(srcdir)/$$f $(udevdir)/$$f; \ + $(INSTALL_DATA) -c -D $(srcdir)/$$f $(udevdir)/$$f; \ done install_device-mapper: $(DM_RULES)
@@ -40,7 +40,7 @@ install_device-mapper: $(DM_RULES) @for f in $(DM_RULES); \ do \ $(RM) $(udevdir)/$$f; \ - $(INSTALL) -c -D $(OWNER) $(GROUP) -m 644 $(srcdir)/$$f $(udevdir)/$$f; \ + $(INSTALL_DATA) -c -D $(srcdir)/$$f $(udevdir)/$$f; \ done install: install_lvm2 install_device-mapper
Signature · 1 line
1.5.4.3
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
Quoted 2 lines · Fabio M. Di Nitto
remove owner and group definitions and install anything writable as mendated by the debian policy
--with-user= and --with-group= should already handle the owner and group (i.e. set them to blank like we do in RHEL/Fedora)
The hard-coded perms in the makefiles probably need treating in a similar fashion.
Alasdair
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
Quoted 5 lines · Alasdair G Kergon
Quoted 2 lines · Fabio M. Di Nitto
remove owner and group definitions and install anything writable as mendated by the debian policy
--with-user= and --with-group= should already handle the owner and group (i.e. set them to blank like we do in RHEL/Fedora)
So noone uses that functionality. Why is it there and why is it used by default? Every system where the defaults used by install (maybe *BSD) have there own mechanism to solve this.
Bastian
Signature · 2 lines
Conquest is easy. Control is not. -- Kirk, "Mirror, Mirror", stardate unknown
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
Quoted 2 lines · Bastian Blank
why is it used by
default?
I'm open to changing that default.
Alasdair
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
Quoted 5 lines · Alasdair G Kergon
Quoted 2 lines · Bastian Blank
why is it used by
default?I'm open to changing that default.
Let's split this patch in 2:
1) OWNER/GROUP defaults, I'd say we should change the default to "".
Both Fedora and Debian drops it, all packaging systems I have seen around expect to build/install as user and then convert to proper owner/group as mandate by distribution policies.
I don't see a real good reason to force a default, and as upstream we would still allow override via configure options.
2) install permissions.
I have more or less the same comment as #1. All distribution packaging do a permission cleanup after "make install" by forcing distribution policies.
Unless there is a real security concern behind it, I think we can delegate such tasks to install and packagers.
The Debian defaults seem sane enough to me, but I am open to suggestions.
Making it a configurable set of options seems a bit overkilling.
Fabio
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
Quoted 1 line · Fabio M. Di Nitto
1) OWNER/GROUP defaults, I'd say we should change the default to "".
Yes.
Quoted 10 lines
2) install permissions.
I have more or less the same comment as #1. All distribution packaging do a permission cleanup after "make install" by forcing distribution policies.
Unless there is a real security concern behind it, I think we can delegate such tasks to install and packagers.
Making it a configurable set of options seems a bit overkilling.
If I run this outside a packaging framework I still need the permissions to be set.
So then leave this unchanged, and there is no point in Debian or any other packaging system removing the existing permission setting because the packaging system is going to override it afterwards anyway.
Alasdair
PATCH 11/11 debian: drop concept of OWNER/GROUP and let install do it's job for permissions
Quoted 2 lines · Alasdair G Kergon
If I run this outside a packaging framework I still need the permissions to be set.
Hu? All it changes is to make them writable for the user. Having unwritable files does not really make fun.
Quoted 3 lines
So then leave this unchanged, and there is no point in Debian or any other packaging system removing the existing permission setting because the packaging system is going to override it afterwards anyway.
It still is, because it breaks my assumptions of the development process to have unwritable files en masse.
Bastian
Signature · 3 lines
Each kiss is as the first. -- Miramanee, Kirk's wife, "The Paradise Syndrome", stardate 4842.6