All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-security][PATCH] trousers: allow overriding localstatedir mandir sysconfdir
@ 2017-11-01 11:59 André Draszik
  2017-11-09 19:35 ` akuster808
  0 siblings, 1 reply; 2+ messages in thread
From: André Draszik @ 2017-11-01 11:59 UTC (permalink / raw)
  To: yocto

From: André Draszik <adraszik@tycoint.com>

It is currently impossible to override localstatedir,
mandir and sysconfdir during ./configure, because they
are being overriden unconditionally.

With this patch it is now possible to set above
locations as needed.

Signed-off-by: André Draszik <adraszik@tycoint.com>
---
 ...-override-localstatedir-mandir-sysconfdir.patch | 68 ++++++++++++++++++++++
 meta-tpm/recipes-tpm/trousers/trousers_git.bb      |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch

diff --git a/meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch b/meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch
new file mode 100644
index 0000000..7b3cc77
--- /dev/null
+++ b/meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch
@@ -0,0 +1,68 @@
+From 3396fc7a184293c23135161f034802062f7f3816 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 1 Nov 2017 11:41:48 +0000
+Subject: [PATCH] build: don't override --localstatedir --mandir --sysconfdir
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It is currently impossible to override localstatedir,
+mandir and sysconfdir during ./configure, because they
+are being overriden unconditionally because of they
+way trousers is built using rpmbuild.
+
+If they need massaging for rpmbuild, the values should
+be specified inside the spec file, not in ./configure
+and thereby overriding user-requested values.
+
+With this patch it is now possible to set above
+locations as needed. The .spec file is being modified
+as well so as to restore previous behaviour.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Submitted [https://sourceforge.net/p/trousers/mailman/message/36099290/]
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+ configure.ac          | 11 ++---------
+ dist/trousers.spec.in |  2 +-
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b9626af..7fe5f8e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -376,16 +376,9 @@ CFLAGS="$CFLAGS -I../include \
+ KERNEL_VERSION=`uname -r`
+ AC_SUBST(CFLAGS)
+ 
+-# When we build the rpms, prefix will be /usr. This'll do some things that make sense,
+-# like put our sbin stuff in /usr/sbin and our library in /usr/lib. It'll do some other
+-# things that don't make sense like put our config file in /usr/etc. So, I'll just hack
+-# it here. If the --prefix option isn't specified during configure, let it all go to
++# If the --prefix option isn't specified during configure, let it all go to
+ # /usr/local, even /usr/local/etc. :-P
+-if test x"${prefix}" = x"/usr"; then
+-	sysconfdir="/etc"
+-	localstatedir="/var"
+-	mandir="/usr/share/man"
+-elif test x"${prefix}" = x"NONE"; then
++if test x"${prefix}" = x"NONE"; then
+ 	localstatedir="/usr/local/var"
+ fi
+ 
+diff --git a/dist/trousers.spec.in b/dist/trousers.spec.in
+index b298b0e..10ef178 100644
+--- a/dist/trousers.spec.in
++++ b/dist/trousers.spec.in
+@@ -45,7 +45,7 @@ applications.
+ 
+ %build
+ %{?arch64:export PKG_CONFIG_PATH=%{pkgconfig_path}:$PKG_CONFIG_PATH}
+-./configure --prefix=/usr --libdir=%{_libdir}
++./configure --prefix=/usr --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man
+ make
+ 
+ %clean
+-- 
+2.15.0.rc1
+
diff --git a/meta-tpm/recipes-tpm/trousers/trousers_git.bb b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
index 352374c..e9f838e 100644
--- a/meta-tpm/recipes-tpm/trousers/trousers_git.bb
+++ b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
     	file://trousers-udev.rules \
     	file://tcsd.service \
         file://get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch \
+        file://0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch \
     	"
 
 S = "${WORKDIR}/git"
-- 
2.15.0.rc1



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

* Re: [meta-security][PATCH] trousers: allow overriding localstatedir mandir sysconfdir
  2017-11-01 11:59 [meta-security][PATCH] trousers: allow overriding localstatedir mandir sysconfdir André Draszik
@ 2017-11-09 19:35 ` akuster808
  0 siblings, 0 replies; 2+ messages in thread
From: akuster808 @ 2017-11-09 19:35 UTC (permalink / raw)
  To: André Draszik, yocto

merged.


not sure if I sent our a confirmation email.

Thanks,

armin


On 11/01/2017 04:59 AM, André Draszik wrote:
> From: André Draszik <adraszik@tycoint.com>
>
> It is currently impossible to override localstatedir,
> mandir and sysconfdir during ./configure, because they
> are being overriden unconditionally.
>
> With this patch it is now possible to set above
> locations as needed.
>
> Signed-off-by: André Draszik <adraszik@tycoint.com>
> ---
>  ...-override-localstatedir-mandir-sysconfdir.patch | 68 ++++++++++++++++++++++
>  meta-tpm/recipes-tpm/trousers/trousers_git.bb      |  1 +
>  2 files changed, 69 insertions(+)
>  create mode 100644 meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch
>
> diff --git a/meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch b/meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch
> new file mode 100644
> index 0000000..7b3cc77
> --- /dev/null
> +++ b/meta-tpm/recipes-tpm/trousers/files/0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch
> @@ -0,0 +1,68 @@
> +From 3396fc7a184293c23135161f034802062f7f3816 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
> +Date: Wed, 1 Nov 2017 11:41:48 +0000
> +Subject: [PATCH] build: don't override --localstatedir --mandir --sysconfdir
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +It is currently impossible to override localstatedir,
> +mandir and sysconfdir during ./configure, because they
> +are being overriden unconditionally because of they
> +way trousers is built using rpmbuild.
> +
> +If they need massaging for rpmbuild, the values should
> +be specified inside the spec file, not in ./configure
> +and thereby overriding user-requested values.
> +
> +With this patch it is now possible to set above
> +locations as needed. The .spec file is being modified
> +as well so as to restore previous behaviour.
> +
> +Signed-off-by: André Draszik <adraszik@tycoint.com>
> +---
> +Upstream-Status: Submitted [https://sourceforge.net/p/trousers/mailman/message/36099290/]
> +Signed-off-by: André Draszik <adraszik@tycoint.com>
> + configure.ac          | 11 ++---------
> + dist/trousers.spec.in |  2 +-
> + 2 files changed, 3 insertions(+), 10 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index b9626af..7fe5f8e 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -376,16 +376,9 @@ CFLAGS="$CFLAGS -I../include \
> + KERNEL_VERSION=`uname -r`
> + AC_SUBST(CFLAGS)
> + 
> +-# When we build the rpms, prefix will be /usr. This'll do some things that make sense,
> +-# like put our sbin stuff in /usr/sbin and our library in /usr/lib. It'll do some other
> +-# things that don't make sense like put our config file in /usr/etc. So, I'll just hack
> +-# it here. If the --prefix option isn't specified during configure, let it all go to
> ++# If the --prefix option isn't specified during configure, let it all go to
> + # /usr/local, even /usr/local/etc. :-P
> +-if test x"${prefix}" = x"/usr"; then
> +-	sysconfdir="/etc"
> +-	localstatedir="/var"
> +-	mandir="/usr/share/man"
> +-elif test x"${prefix}" = x"NONE"; then
> ++if test x"${prefix}" = x"NONE"; then
> + 	localstatedir="/usr/local/var"
> + fi
> + 
> +diff --git a/dist/trousers.spec.in b/dist/trousers.spec.in
> +index b298b0e..10ef178 100644
> +--- a/dist/trousers.spec.in
> ++++ b/dist/trousers.spec.in
> +@@ -45,7 +45,7 @@ applications.
> + 
> + %build
> + %{?arch64:export PKG_CONFIG_PATH=%{pkgconfig_path}:$PKG_CONFIG_PATH}
> +-./configure --prefix=/usr --libdir=%{_libdir}
> ++./configure --prefix=/usr --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man
> + make
> + 
> + %clean
> +-- 
> +2.15.0.rc1
> +
> diff --git a/meta-tpm/recipes-tpm/trousers/trousers_git.bb b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
> index 352374c..e9f838e 100644
> --- a/meta-tpm/recipes-tpm/trousers/trousers_git.bb
> +++ b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
> @@ -15,6 +15,7 @@ SRC_URI = " \
>      	file://trousers-udev.rules \
>      	file://tcsd.service \
>          file://get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch \
> +        file://0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch \
>      	"
>  
>  S = "${WORKDIR}/git"



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

end of thread, other threads:[~2017-11-09 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 11:59 [meta-security][PATCH] trousers: allow overriding localstatedir mandir sysconfdir André Draszik
2017-11-09 19:35 ` akuster808

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.