All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Smirnov <onlyjob-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
To: Ryusuke Konishi
	<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: few patches from Debian
Date: Wed, 16 Apr 2014 11:22:48 +1000	[thread overview]
Message-ID: <6284364.q7fsBQ3iYY@debstor> (raw)
In-Reply-To: <20140414.063654.356443912.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3838 bytes --]

=2D-nextPart8644279.qaQxpZWPAB
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On Mon, 14 Apr 2014 06:36:54 Ryusuke Konishi wrote:
> fhs.patch introduced the following error:
> 
>  $ ./autogen.sh
>  $ ./configure
>  $ make
>  $ sudo make install
>  ...
>  make[2]: Entering directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>  make[3]: Entering directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>   /bin/mkdir -p '/etc'
>   /usr/bin/install -c -m 644 nilfs_cleanerd.conf '/etc'
>   /bin/mkdir -p 'NONE/sbin'
>    /bin/sh ../../libtool   --mode=install /usr/bin/install -c nilfs_cleanerd
> 'NONE/sbin' libtool: install: `NONE/sbin' must be an absolute directory
> name
>  libtool: install: Try `libtool --help --mode=install' for more information.
> make[3]: *** [install-sbinPROGRAMS] Error 1
>  make[3]: Leaving directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>  make[2]: *** [install-am] Error 2
>  make[2]: Leaving directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>  make[1]: *** [install-recursive] Error 1
>  make[1]: Leaving directory `/home/ryusuke/git/nilfs-utils/sbin'
>  make: *** [install-recursive] Error 1
> 
> Can you fix this error ?

O, my bad, sorry...
Strangely enough I did not hit this error because I was explicitly passing
"--prefix=/usr" to "./configure".

Please find updated patch attached. It should be fine but there might be more 
elegant way to implement this with autotools.

By the way it's pretty scary to do 

    sudo make install

I'd rather invoke as (for example) as:

    make install DESTDIR=/tmp/nilfs-tools.test

Thank you.

=2D- 
Regards,
 Dmitry Smirnov.

=2D-nextPart8644279.qaQxpZWPAB
Content-Disposition: attachment; filename="fhs.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="fhs.patch"

Last-Update: 2014-04-16
Forwarded: yes
Author: Dmitry Smirnov <onlyjob-IGUgQLVVQiRCV4ILt04nZQ@public.gmane.org>
Description: install nilfs-* executables to /usr/sbin:
 Fixes the following problems (thanks, `adequate`):
  bin-or-sbin-binary-requires-usr-lib-library
    /sbin/nilfs-clean => /usr/lib/x86_64-linux-gnu/libnilfscleaner.so.0
    /sbin/nilfs-clean => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs-resize => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs-resize => /usr/lib/x86_64-linux-gnu/libnilfsgc.so.0
    /sbin/nilfs-tune => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs_cleanerd => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs_cleanerd => /usr/lib/x86_64-linux-gnu/libnilfsgc.so.0

=2D-- a/configure.ac
+++ b/configure.ac
@@ -165,9 +165,12 @@
 AC_SYS_LARGEFILE
 
 # Install directories
 AC_PREFIX_DEFAULT([/usr])
=2DAC_SUBST([sbindir], [/sbin])
+test "x$prefix" = "xNONE" && prefix="/usr"
+test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
+AC_SUBST([root_sbindir], [/sbin])
+AC_SUBST([sbindir], [${exec_prefix}/sbin])
 AC_SUBST([sysconfdir], [/etc])
 AC_SUBST([localstatedir], [/var])
 
 AC_CONFIG_FILES([Makefile
=2D-- a/sbin/mkfs/Makefile.am
+++ b/sbin/mkfs/Makefile.am
@@ -5,9 +5,9 @@
 LDADD = -luuid $(LIB_BLKID) $(top_builddir)/lib/libnilfsfeature.la \
 	$(top_builddir)/lib/libmountchk.la \
 	$(top_builddir)/lib/libcrc32.la
 
=2Dsbin_PROGRAMS = mkfs.nilfs2
+root_sbin_PROGRAMS = mkfs.nilfs2
 
 mkfs_nilfs2_SOURCES = mkfs.c bitops.c mkfs.h
 
 EXTRA_DIST = .gitignore
=2D-- a/sbin/mount/Makefile.am
+++ b/sbin/mount/Makefile.am
@@ -10,9 +10,9 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include
 LDADD = $(top_builddir)/lib/librealpath.la \
 	$(top_builddir)/lib/libcleanerexec.la $(LIB_MOUNT) $(LIB_SELINUX)
 
=2Dsbin_PROGRAMS = mount.nilfs2 umount.nilfs2
+root_sbin_PROGRAMS = mount.nilfs2 umount.nilfs2
 
 if CONFIG_LIBMOUNT
 
 COMMONSOURCES += mount_attrs.c

=2D-nextPart8644279.qaQxpZWPAB--
This is a multi-part message in MIME format.

[-- Attachment #1.2: Type: text/plain, Size: 1544 bytes --]

On Mon, 14 Apr 2014 06:36:54 Ryusuke Konishi wrote:
> fhs.patch introduced the following error:
> 
>  $ ./autogen.sh
>  $ ./configure
>  $ make
>  $ sudo make install
>  ...
>  make[2]: Entering directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>  make[3]: Entering directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>   /bin/mkdir -p '/etc'
>   /usr/bin/install -c -m 644 nilfs_cleanerd.conf '/etc'
>   /bin/mkdir -p 'NONE/sbin'
>    /bin/sh ../../libtool   --mode=install /usr/bin/install -c nilfs_cleanerd
> 'NONE/sbin' libtool: install: `NONE/sbin' must be an absolute directory
> name
>  libtool: install: Try `libtool --help --mode=install' for more information.
> make[3]: *** [install-sbinPROGRAMS] Error 1
>  make[3]: Leaving directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>  make[2]: *** [install-am] Error 2
>  make[2]: Leaving directory `/home/ryusuke/git/nilfs-utils/sbin/cleanerd'
>  make[1]: *** [install-recursive] Error 1
>  make[1]: Leaving directory `/home/ryusuke/git/nilfs-utils/sbin'
>  make: *** [install-recursive] Error 1
> 
> Can you fix this error ?

O, my bad, sorry...
Strangely enough I did not hit this error because I was explicitly passing
"--prefix=/usr" to "./configure".

Please find updated patch attached. It should be fine but there might be more 
elegant way to implement this with autotools.

By the way it's pretty scary to do 

    sudo make install

I'd rather invoke as (for example) as:

    make install DESTDIR=/tmp/nilfs-tools.test

Thank you.

-- 
Regards,
 Dmitry Smirnov.

[-- Attachment #1.3: fhs.patch --]
[-- Type: text/x-patch, Size: 1911 bytes --]

Last-Update: 2014-04-16
Forwarded: yes
Author: Dmitry Smirnov <onlyjob-IGUgQLVVQiRCV4ILt04nZQ@public.gmane.org>
Description: install nilfs-* executables to /usr/sbin:
 Fixes the following problems (thanks, `adequate`):
  bin-or-sbin-binary-requires-usr-lib-library
    /sbin/nilfs-clean => /usr/lib/x86_64-linux-gnu/libnilfscleaner.so.0
    /sbin/nilfs-clean => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs-resize => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs-resize => /usr/lib/x86_64-linux-gnu/libnilfsgc.so.0
    /sbin/nilfs-tune => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs_cleanerd => /usr/lib/x86_64-linux-gnu/libnilfs.so.0
    /sbin/nilfs_cleanerd => /usr/lib/x86_64-linux-gnu/libnilfsgc.so.0

--- a/configure.ac
+++ b/configure.ac
@@ -165,9 +165,12 @@
 AC_SYS_LARGEFILE
 
 # Install directories
 AC_PREFIX_DEFAULT([/usr])
-AC_SUBST([sbindir], [/sbin])
+test "x$prefix" = "xNONE" && prefix="/usr"
+test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
+AC_SUBST([root_sbindir], [/sbin])
+AC_SUBST([sbindir], [${exec_prefix}/sbin])
 AC_SUBST([sysconfdir], [/etc])
 AC_SUBST([localstatedir], [/var])
 
 AC_CONFIG_FILES([Makefile
--- a/sbin/mkfs/Makefile.am
+++ b/sbin/mkfs/Makefile.am
@@ -5,9 +5,9 @@
 LDADD = -luuid $(LIB_BLKID) $(top_builddir)/lib/libnilfsfeature.la \
 	$(top_builddir)/lib/libmountchk.la \
 	$(top_builddir)/lib/libcrc32.la
 
-sbin_PROGRAMS = mkfs.nilfs2
+root_sbin_PROGRAMS = mkfs.nilfs2
 
 mkfs_nilfs2_SOURCES = mkfs.c bitops.c mkfs.h
 
 EXTRA_DIST = .gitignore
--- a/sbin/mount/Makefile.am
+++ b/sbin/mount/Makefile.am
@@ -10,9 +10,9 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include
 LDADD = $(top_builddir)/lib/librealpath.la \
 	$(top_builddir)/lib/libcleanerexec.la $(LIB_MOUNT) $(LIB_SELINUX)
 
-sbin_PROGRAMS = mount.nilfs2 umount.nilfs2
+root_sbin_PROGRAMS = mount.nilfs2 umount.nilfs2
 
 if CONFIG_LIBMOUNT
 
 COMMONSOURCES += mount_attrs.c

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-04-16  1:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11  7:49 few patches from Debian Dmitry Smirnov
2014-04-13 21:36 ` Ryusuke Konishi
     [not found]   ` <20140414.063654.356443912.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-04-16  1:22     ` Dmitry Smirnov [this message]
2014-04-19 10:58       ` Ryusuke Konishi
     [not found]         ` <20140419.195816.57462893.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-04-19 11:17           ` Dmitry Smirnov
2014-04-19 11:26             ` Ryusuke Konishi
     [not found]               ` <20140419.202620.220041591.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-04-19 11:46                 ` Dmitry Smirnov
2014-04-19 12:00                   ` Ryusuke Konishi
     [not found]                     ` <20140419.210014.85398266.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-04-19 12:39                       ` Dmitry Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6284364.q7fsBQ3iYY@debstor \
    --to=onlyjob-8fiuurrzop0dnm+yrofe0a@public.gmane.org \
    --cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.