Discussion:
few patches from Debian
Dmitry Smirnov
2014-04-11 07:49:43 UTC
Permalink
Dear NILFS team,

Thanks for your hard work and for new release of nilfs-tools.

I'd like to share two patches (attached) to fix some minor problems that I've
noticed:

* man.patch (with minor man pages corrections)
* fhs.patch (to install nilfs-* executables to "/usr/sbin" instead of "/sbin"
due to library dependencies in "/usr").

Please review and apply (if appropriate).
Also please CC to me as I'm not subscribed.

Thank you.
--
All the best,
Dmitry Smirnov
GPG key : 4096R/53968D1B
Ryusuke Konishi
2014-04-13 21:36:54 UTC
Permalink
Hi Dmitry,
Post by Dmitry Smirnov
Dear NILFS team,
Thanks for your hard work and for new release of nilfs-tools.
I'd like to share two patches (attached) to fix some minor problems that I've
* man.patch (with minor man pages corrections)
* fhs.patch (to install nilfs-* executables to "/usr/sbin" instead of "/sbin"
due to library dependencies in "/usr").
Please review and apply (if appropriate).
Also please CC to me as I'm not subscribed.
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 ?

Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Smirnov
2014-04-16 01:22:48 UTC
Permalink
Post by Ryusuke Konishi
$ ./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.
Ryusuke Konishi
2014-04-19 10:58:16 UTC
Permalink
Hi,
Post by Dmitry Smirnov
Post by Ryusuke Konishi
$ ./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.
This patch breaks mount program; mount.nilfs2 fails to find cleanerd
since it was moved to /usr/sbin:

# mount -t nilfs2 /dev/sdb1 /test
mount.nilfs2: Error: nilfs_cleanerd not found
nilfs_cleanerd aborted

I think nilfs_cleanerd should be installed to /sbin.
Post by Dmitry Smirnov
By the way it's pretty scary to do
sudo make install
make install DESTDIR=/tmp/nilfs-tools.test
Thank you.
--
Regards,
Dmitry Smirnov.
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Smirnov
2014-04-19 11:17:19 UTC
Permalink
Post by Ryusuke Konishi
This patch breaks mount program; mount.nilfs2 fails to find cleanerd
# mount -t nilfs2 /dev/sdb1 /test
mount.nilfs2: Error: nilfs_cleanerd not found
nilfs_cleanerd aborted
Damn, sorry for mess...
Post by Ryusuke Konishi
I think nilfs_cleanerd should be installed to /sbin.
You're right but in this case it should be statically linked with dependent
libraries...
--
Cheers,
Dmitry Smirnov.
Ryusuke Konishi
2014-04-19 11:26:20 UTC
Permalink
Post by Dmitry Smirnov
Post by Ryusuke Konishi
This patch breaks mount program; mount.nilfs2 fails to find cleanerd
# mount -t nilfs2 /dev/sdb1 /test
mount.nilfs2: Error: nilfs_cleanerd not found
nilfs_cleanerd aborted
Damn, sorry for mess...
Post by Ryusuke Konishi
I think nilfs_cleanerd should be installed to /sbin.
You're right but in this case it should be statically linked with dependent
libraries...
Yes, I agree. nilfs_cleanerd should statically link libnilfs and
libnilfsgc. I am searching the way to do that.

Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Smirnov
2014-04-19 11:46:37 UTC
Permalink
Post by Ryusuke Konishi
Yes, I agree. nilfs_cleanerd should statically link libnilfs and
libnilfsgc. I am searching the way to do that.
So far I was able to do it with corrected patch (attached).
I hope this time I got it right... Apologies for inconvenience...
--
Best wishes,
Dmitry Smirnov.
Ryusuke Konishi
2014-04-19 12:00:14 UTC
Permalink
Post by Dmitry Smirnov
Post by Ryusuke Konishi
Yes, I agree. nilfs_cleanerd should statically link libnilfs and
libnilfsgc. I am searching the way to do that.
So far I was able to do it with corrected patch (attached).
I hope this time I got it right... Apologies for inconvenience...
Don't mind. I will fix the issue a bit differently (as follows) and
then apply your revised patch.

Regards,
Ryusuke Konishi

diff --git a/sbin/cleanerd/Makefile.am b/sbin/cleanerd/Makefile.am
index 0f68670..0af4104 100644
--- a/sbin/cleanerd/Makefile.am
+++ b/sbin/cleanerd/Makefile.am
@@ -9,6 +9,7 @@ nilfs_cleanerd_SOURCES = cleanerd.c cldconfig.c \
nilfs_cleanerd_CFLAGS = -Wall
nilfs_cleanerd_CPPFLAGS = -I$(top_srcdir)/include \
-DSYSCONFDIR=\"$(sysconfdir)\"
+nilfs_cleanerd_LDFLAGS = -static

dist_sysconf_DATA = nilfs_cleanerd.conf



--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Smirnov
2014-04-19 12:39:15 UTC
Permalink
Post by Ryusuke Konishi
I will fix the issue a bit differently (as follows) and
then apply your revised patch.
O, that's even better. I need to work on my autotools skills. :)

Thank you.
--
Best wishes,
Dmitry Smirnov.
Loading...