Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udffsck: command not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 7:52 am    Post subject: udffsck: command not found Reply with quote

I emerged sys-fs/udftools-2.0-r2::gentoo but still, I don't have udffsck. But here is https://github.com/pali/udftools/tree/master/udffsck. How to emerge it?
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 8:51 am    Post subject: Reply with quote

It seems install target is not defined in https://github.com/pali/udftools/tree/master/udffsck itself.
Though I built it from git, make install didn't install udffsck. I manually copied it to /usr/local/bin
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Tue Sep 11, 2018 9:03 am    Post subject: Reply with quote

It's upstream choice, if you read udffsck/Makefile.am you can see
Code:
noinst_PROGRAMS = udffsck
udffsck_SOURCES = main.c

AM_CPPFLAGS = -I$(top_srcdir)/include

the problem is noinst_PROGRAMS. If you want install this tools you should apply a patch to code and ebuild
udftools-2.0-include-udffsck.patch:
diff -Naru udftools-2.0.orig/udffsck/Makefile.am udftools-2.0/udffsck/Makefile.am
--- udftools-2.0.orig/udffsck/Makefile.am       2018-09-11 10:54:11.659895367 +0200
+++ udftools-2.0/udffsck/Makefile.am    2018-09-11 10:54:27.219895346 +0200
@@ -1,4 +1,5 @@
-noinst_PROGRAMS = udffsck
+bin_PROGRAMS = udffsck
+udffsck_LDADD = $(top_builddir)/libudffs/libudffs.la
 udffsck_SOURCES = main.c
 
 AM_CPPFLAGS = -I$(top_srcdir)/include


udftools-ebuild.patch:
--- udftools-2.0-r2.ebuild      2018-09-11 11:04:10.379894544 +0200
+++ udftools-2.0-r3.ebuild      2018-09-11 11:04:57.779894479 +0200
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit flag-o-matic
+inherit autotools flag-o-matic
 
 DESCRIPTION="Ben Fennema's tools for packet writing and the UDF filesystem"
 HOMEPAGE="https://github.com/pali/udftools/ https://sourceforge.net/projects/linux-udf/"
@@ -18,3 +18,8 @@
 DEPEND="${RDEPEND}"
 
 PATCHES=( "${FILESDIR}/${P}-sysmacros.patch" )
+
+src_prepare() {
+       default
+       eautoreconf
+}

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 9:03 am    Post subject: Reply with quote

though the udffsck binary was created, udffsck /dev/sda1 does nothing. should have checked https://github.com/pali/udftools/blob/master/udffsck/main.c, stupid of me

Added url tags, to exclude the trailing comma. -- desultory
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Tue Sep 11, 2018 9:05 am    Post subject: Reply with quote

necktwi wrote:
stupid of me

And me :? , I checked makefile but not code!
See here
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Sep 11, 2018 9:06 am    Post subject: Reply with quote

necktwi,

The build log for udftools-2.0-r2 shows that udffsck is built, then thrown away
Code:
Making install in udffsck
make[1]: Entering directory '/var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck'
make[2]: Entering directory '/var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck'
make[1]: Leaving directory '/var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck'


So udffsck is not copied to the temporary image location before it would get installed on the root filesystem.

Poking at make install, the -n is pretend
Code:
NeddySeagoon_Static  /var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck # make -n install
make  install-exec-am install-data-am
make[1]: Entering directory '/var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck'
make[1]: Nothing to be done for 'install-exec-am'.
make[1]: Nothing to be done for 'install-data-am'.
make[1]: Leaving directory '/var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck'

shows that its a feature of the udftools build system.

Fixing that is beyond my skillset. There is also the thought that its deliberate, because say, udffsck doesn't work?

If you really want it, this is a bit of a hack, run
Code:
ebuild /usr/portage/sys-fs/udftools/udftools-2.0-r2.ebuild install
and the udffsck binary will be in /var/tmp/portage/sys-fs/udftools-2.0-r2/work/udftools-2.0/udffsck

Like I say, if its broken, you get to keep all the pieces.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 10:10 am    Post subject: Reply with quote

Thank you all for the info. I shall check disk on windows for now.

I have symlinked /var/tmp of my RPI to /media/Tin(my_udf_usb_harddisk)/Var/Tmp, to avoid wearing of my SD card. But emerge tar has given I/O error in middle of update @world corrupting /media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/. Now I couldn't rm -rf /media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6. But I could do mv /me.../glibc-2.27-r6 /me.../Corrupted_glibc-2.27-r6 and reboot and update @world with successful tar but now halted with a segmentation fault; unable to create a symlink

Code:
* Unable to trace static ELF: /media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl/elf/sln: /media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl/elf/sln /media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl/elf/symlink.list
make[1]: *** [Makefile:106: install-symbolic-link] Segmentation fault
make[1]: Leaving directory '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/glibc-2.27'
make: *** [Makefile:12: install] Error 2
 * ERROR: sys-libs/glibc-2.27-r6::gentoo failed (install phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.27-r6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.27-r6::gentoo'`.
 * The complete build log is located at '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/temp/build.log'.
 * The ebuild environment file is located at '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/temp/environment'.
 * Working directory: '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl'
 * S: '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/glibc-2.27'

>>> Failed to emerge sys-libs/glibc-2.27-r6, Log file:

>>>  '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/temp/build.log'

 * Messages for package sys-libs/glibc-2.27-r6:

 * Applying Gentoo Glibc Patchset 2.27-3
 * ERROR: sys-libs/glibc-2.27-r6::gentoo failed (install phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.27-r6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.27-r6::gentoo'`.
 * The complete build log is located at '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/temp/build.log'.
 * The ebuild environment file is located at '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/temp/environment'.
 * Working directory: '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl'
 * S: '/media/Tin/Var/Tmp/portage/sys-libs/glibc-2.27-r6/work/glibc-2.27'

should I rise an issue at https://github.com/pali/udftools ?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Sep 11, 2018 10:19 am    Post subject: Reply with quote

necktwi ...

as you've surmised, that exclusion is intentional, it was previously installed with =sys-fs/udftools-1.0.0b-r9 (looking at the output of e-file). If it's a choice between not being able to fsck, or having fsck destroy, or make inoperable, the filesystem, then you're probably better off with the former (and I expect that is the rational behind its exclusion). Anyhow, you know that, but regardless if you're mounting ufs, I would suggest you do so read only, and use a USB stick (with vfat, or what-have-you) to copy the other way ... that way you should never need fsck.

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Sep 11, 2018 10:32 am    Post subject: Reply with quote

necktwi,

The only use I have had for UFS is packet writing on optical media.
Other than being very slow, it lets you use a CD-RW and DVD+RW as random access media.

That was in the days when CD-RW was huge compared to a floppy and floppies were still in use.

All ckfs programs are dangerous to user data. By there very nature, they are used on damaged or inconsistent filesystems.
That means that they must make assumptions (guesses) about what should really be there.
They often make a bad situation worse.

They all have one thing in common. They try to make the filesystem metadata self consistent, to keep mount happy.
That says nothing about any user data that may be on the filesystem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 10:34 am    Post subject: Reply with quote

I'm using udf usb hdd with the RPi so that I can plug it into windows or mac, when finished downloading some torrents :twisted:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Sep 11, 2018 10:40 am    Post subject: Reply with quote

necktwi,

vfat or exfat will be safer.
exfat is a FUSE filesystem, so its slower.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 10:41 am    Post subject: Reply with quote

but they are not case sensitive!
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 11:28 am    Post subject: Reply with quote

the above symlink failure occurred even on the btrfs /. I'll post it under arm support.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Sep 11, 2018 11:48 am    Post subject: Reply with quote

necktwi wrote:
but they are not case sensitive!

necktwi ... why does it matter in this instance, are you doing any filename manipulation on the Pi? If not then the filenames are as provided via bittorrent, and macOS, or Windows, shouldn't have an issue. If you need case sensitivity then there is always NTFS (ntfs3g is r+w), and I'm fairly sure this is supported on macOS.

best ... khay
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 11:55 am    Post subject: Reply with quote

Why case-sensitive? Because words starting with capitals are nouns and can be used properly!
http://www.enchantedlearning.com/wordlist/nounandverb.shtml

Why use it just for torrents when you can host some git repos!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Sep 11, 2018 1:05 pm    Post subject: Reply with quote

necktwi wrote:
Why case-sensitive? Because words starting with capitals are nouns and can be used properly!
http://www.enchantedlearning.com/wordlist/nounandverb.shtml

necktwi ... but again, why does it matter in this instance. I'm not saying that case sensitivity is a bad idea, I'm saying it doesn't matter, the files will be named (via the torrent author) "FileName", or "filename", or "FiLeNaMe", regardless of the correct use of noun/verb, or the case senstivity of the filesystem. That's why I asked if you're doing any filename modification, if you were then you might run into issues, otherwise I can't see you doing so.

necktwi wrote:
Why use it just for torrents when you can host some git repos!

... and you're going to need to mount this on macOS, or Windows, to access the git repo? That seems like an entirely different use-case.

best ... khay
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Tue Sep 11, 2018 1:14 pm    Post subject: Reply with quote

vfat max file size is 4GB if i'm not wrong. exfat is slow. if i download a torrent with case sensitive files then i'm screwed up. i may have to use it for git repos or some other purpose in future. so i've chosen udf.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Sep 11, 2018 7:24 pm    Post subject: Reply with quote

necktwi wrote:
vfat max file size is 4GB if i'm not wrong. exfat is slow.

necktwi ... yes, 4GB, but if you need a filesystem interoperable between windows, macOS, and linux, without those limitations/issues then there is (as I mentioned above) NTFS.

necktwi wrote:
[...] if i download a torrent with case sensitive files then i'm screwed up.

There is no such thing as "case sensitive files", it's filesystems that are case sensitive (or not). Let's say your filename is aAbBcC, the only case senstive issue is if there is another file called aabbccdd, or Aabbccdd, etc, the filesystem will consider those the same file, but again, what is the senario your expecting, and what do you think bittorent does when run on a vfat filesystem (considering it was the de facto windows filesystem)?

necktwi wrote:
i may have to use it for git repos or some other purpose in future. so i've chosen udf.

Fair enough, but that future might be better served with a filesystem other than UDF.

best ... khay
Back to top
View user's profile Send private message
necktwi
Apprentice
Apprentice


Joined: 24 Aug 2018
Posts: 168

PostPosted: Thu Sep 13, 2018 2:57 am    Post subject: Reply with quote

khayyam wrote:
if there is another file called aabbccdd, or Aabbccdd, etc,

is exactly what I'm worried about.
khayyam wrote:
but that future might be better served with a filesystem other than UDF

I can only wish BTRFS works with macOS or APFS works with Linux.

Thank you!
Back to top
View user's profile Send private message
trubicoid
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2009
Posts: 79

PostPosted: Thu Jan 16, 2020 11:59 am    Post subject: Reply with quote

The udffsck tool can be found here:
https://github.com/argorain/udftools

and not in the official udftools repository
https://github.com/pali/udftools
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum