Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288721 - dev-util/smem and app-misc/secure-delete -- filename collision /usr/bin/smem
Summary: dev-util/smem and app-misc/secure-delete -- filename collision /usr/bin/smem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 12:55 UTC by Niko Efthymiou
Modified: 2013-03-24 11:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
secure-delete-3.1-r2.ebuild (secure-delete-3.1-r2.ebuild,1.58 KB, text/plain)
2013-01-18 10:14 UTC, Lukas Elsner
Details
secure-delete-3.1-r3.ebuild (secure-delete-3.1-r3.ebuild,1.58 KB, text/plain)
2013-01-18 18:43 UTC, Lukas Elsner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niko Efthymiou 2009-10-12 12:55:35 UTC
/usr/bin/smem is also used by app-misc/secure-delete-3.1

Reproducible: Always

Steps to Reproduce:
1. emerge -va app-misc/secure-delete
2. emerge -va dev-util/smem


Actual Results:  
portage reports a that /usr/bin/smem is owned by secure-delete

Expected Results:  
both packages schould be installable.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-10-12 14:21:54 UTC
I'm so tempted to remove secure-delete… latest release in 2003 and doesn't work on Journaling filesystems…
Comment 2 Sergey Popov gentoo-dev 2012-12-28 15:42:04 UTC
Diego, ping
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-12-31 17:13:35 UTC
I can CC treecleaners if you want, secure-delete does not work on anything but ext2 at this point, as far as I can tell.
Comment 4 Pacho Ramos gentoo-dev 2012-12-31 17:21:50 UTC
(In reply to comment #3)
> I can CC treecleaners if you want, secure-delete does not work on anything
> but ext2 at this point, as far as I can tell.

What kind of error does it show when used in filesystems with journaling?
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-12-31 17:24:51 UTC
I remember reading that it simply did not work out of the box on ext3 (and thus I suppose ext4), but it required a kernel module. Nowadays, ext3/4 iirc have an option to do "secure-delete" at mount time.
Comment 6 Pacho Ramos gentoo-dev 2012-12-31 18:07:24 UTC
I said that because probably some people will be against killing this only for a collision issue :/
Comment 7 Lukas Elsner 2013-01-18 09:42:16 UTC
I am really using secure-delete for zeroing out my virtual machines. this is needed, because the compressed backup size can be reduced.
This works very well on ext4 and btrfs file systems.

Since it is working, why should be there another release for holding it in portage tree?

Maybe just renaming the binary could make everyone happy?
Comment 8 Lukas Elsner 2013-01-18 10:14:02 UTC
Created attachment 336032 [details]
secure-delete-3.1-r2.ebuild

removes /usr/bin/smem file conflict
Comment 9 Lukas Elsner 2013-01-18 10:14:28 UTC
should be fine now ;)
Comment 10 Peter Weilbacher 2013-01-18 10:46:08 UTC
What alternatives are there when secure-delete is removed?
Comment 11 Lukas Elsner 2013-01-18 12:20:56 UTC
I think my alternative would be using dd/ddrescue
(ddrescue /dev/zero /zerofile.ooo && rm /zerofile.ooo)
or just code down a tool which does this in my vms

But I really dont see any reason for deleting it.
It is in my overlay now, so I (and everyone else of course) can use it from there.
Comment 12 Peter Weilbacher 2013-01-18 17:37:35 UTC
Well, dd/ddrescue doesn't do the multiple overwrites, so it's not a real replacement for original purpose of the package. In the meantime I found a few packages which cover part of the features of the secure-delete package but none that (1) are in portage and (2) do everything that secure-delete does.

Sure, srm in itself does not perfectly work on journaling systems, because it doesn't overwrite the journal (which is not discussed in the documentation AFAICS even though the ewarn suggests this) but it's still better than normal rm in that case and it's also still useful for those non-journaling FSs out there (e.g. for cleaning USB sticks with FAT before throwing them away). AFAICT the other tools in the package (sfill, smem, sswap) still work perfectly even though they haven't been updated since 2003.

By the way, I found this in the Debian change log for their secure-delete package (which is still there) for the 2010 update to 3.1-5:
   * Rename smem to sdmem to avoid name clash with smem package
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-18 17:51:56 UTC
There's a thread on gentoo-dev if you want to check, which points out the shred utility in coreutils as a replacement for srm (including the multipass), as well as an article suggesting that the multipass is basically useless and just voodoo/cargo culting, and a note that smem can't work without help from the kernel (in which case the whole point of the collision is moot, but also the rest of the package is, given shred is there and so on).
Comment 14 Lukas Elsner 2013-01-18 18:43:12 UTC
Created attachment 336072 [details]
secure-delete-3.1-r3.ebuild

rename smem -> sdmem (exactly like debian does)
Comment 15 Bloody 2013-01-22 21:25:57 UTC
(In reply to comment #7)
> I am really using secure-delete for zeroing out my virtual machines. this is
> needed, because the compressed backup size can be reduced.
> This works very well on ext4 and btrfs file systems.

Same here, zeroing out free space on virtual disks before compressing for backups. Found it useful to have inodes zeroed out also, making the image even better compressible.

Not updated since 2003 isn't necessarily bad - the program just works and the package maintainers are having an easy life with it. Looks like another package i have to maintain myself from now on..
Comment 16 Pacho Ramos gentoo-dev 2013-01-22 21:57:05 UTC
Please take a look to:
http://www.gossamer-threads.com/lists/gentoo/dev/266520
Comment 17 Lukas Elsner 2013-01-23 10:43:35 UTC
This also does not solve the problem.

Scrub acts overrides my block devices. What we need is a tool like sfill, wich zeroes out ONLY the free space on file system level.

I do not know any alternatives. 

Additionally sfill is available for windows systems, which makes administration quite easy, because one has only to remember one command ;)


I really dont know, why we are discussing this.
Here are users needing this application. So do NOT remove!

If you do not want to maintain that tool, let me become a gentoo dev and I will do.
Comment 18 Lukas Elsner 2013-01-23 10:46:24 UTC
Ooops, I did not read the whole manpage. Discscrub could be an alternative, since it can operate on filesystem.

But I do not think that this is a reason für removing secure-delete.


Firefox is an alternative to Chromium, but nobody wants to remove! ;)
Comment 19 Bloody 2013-01-23 11:31:30 UTC
I haven't yet seen an explanation in the scrub manpage saying that unused inodes can be zero-filled also. I'm using sfill because it can, otherwise i would just cat /dev/zero >deleteme ..

Maybe i should take the secure-delete sourcecode and extract just a simplified version of sfill for that one sole purpose, as scrub seems to fill the other gaps.
Comment 20 Pacho Ramos gentoo-dev 2013-01-23 21:24:58 UTC
Per:
http://www.gossamer-threads.com/lists/gentoo/dev/266551#266551

Looks like this way of doing things are not really ok :/
Comment 21 Bloody 2013-01-24 17:22:17 UTC
I've created a simplified replacement for the sfill binary from the secure-delete package. People who also use sfill to prepare virtual disks for backup compression (like i do) might give it a try:

  http://zerofill.sourceforge.net

Fixed a few things & simplified everything to just write zero-bytes once, no secure-deletion aspects considered.

The remaining functionality from secure-delete might be covered by scrub, so if the secure-delete packages goes byebye on gentoo, i got what i need.

Beware that i've tested it a couple of times but the project is still fresh and should be used with caution for now, even if i've probaly fixed more bugs than i might have added.
Comment 22 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-24 17:43:03 UTC
I'll pick zerofill up soon(ish), as it's something that could be useful to me as well..
Comment 23 Lukas Elsner 2013-01-24 22:19:27 UTC
Nice work! Is there any repo for getting the source code, or just the tarball?
Comment 24 Bloody 2013-01-24 22:43:38 UTC
Just the tarball. U got something particular in mind?
Comment 25 Lukas Elsner 2013-01-24 23:21:25 UTC
Well, I clone all projects I am watching or involved in, to have the ability stumbling around in the most recent code. And since its uncommon not hosting a repo, I just asked for the case I failed to see the link! ;)
Comment 26 Bloody 2013-01-24 23:29:52 UTC
I know, it's oldschool, but so am I, past all hope.. :P
Comment 27 Lukas Elsner 2013-02-03 14:37:19 UTC
what about:


* sys-fs/zerofree
     Available versions:  (~)1.0.1
     Homepage:            http://intgat.tigress.co.uk/rmy/uml/index.html
     Description:         Zero's out all free space on a filesystem.

?
Comment 28 Lukas Elsner 2013-02-03 14:41:31 UTC
oh, zerofree cannot act on a rw mounted fs. too bad...
Comment 29 Dion Moult (RETIRED) gentoo-dev 2013-03-24 10:59:18 UTC
Package removed.
Comment 30 Lukas Elsner 2013-03-24 11:12:25 UTC
I really do not understand this removal. You could use the fixed ebuild and everything is fine... 

Anyways, I am hosting secure-delete in my overlay for everyone who is using this!