Bug 1249287 - Uneeded dependency of tcsh
Uneeded dependency of tcsh
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dt (Show other bugs)
22
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Kozina
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-01 05:59 EDT by Sitsofe Wheeler
Modified: 2016-03-01 00:22 EST (History)
3 users (show)

See Also:
Fixed In Version: dt-18.32-3.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-29 17:22:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sitsofe Wheeler 2015-08-01 05:59:03 EDT
Description of problem:
The dt has an unneeded dependency of tcsh because of example scripts.

Version-Release number of selected component (if applicable):
dt-18.32-1.fc22.x86_64

How reproducible:
Reproducible every time.

Steps to Reproduce:
1. Run
rpm -q --requires dt
2. Run
find /usr/share/dt | /usr/lib/rpm/find-requires

Actual results:
For 1.
/bin/csh
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rtld(GNU_HASH)

For 2.

/bin/csh

Expected results:
No /bin/csh line in either step.

Additional info:
Poking around it looks like files like /usr/share/dt/dt[atfrwcs] are what are triggering the automatic dependency. Could the output of the automatic dep find be adjusted to filter out /bin/csh ?
Comment 1 Ondrej Kozina 2015-08-03 03:11:54 EDT
Let's see if I can find a way how to bend the .spec file to not to add such dependency.
Comment 2 Sitsofe Wheeler 2015-08-03 13:47:48 EDT
I been thinking about this too. I'm taking a look at https://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies and will post somehting if you don't get there first :-)
Comment 3 Sitsofe Wheeler 2015-08-03 14:11:47 EDT
How about this:

--- SPECS/dt.spec.old	2014-09-24 16:21:31.000000000 +0000
+++ SPECS/dt.spec	2015-08-03 18:08:44.150253653 +0000
@@ -34,6 +34,7 @@
 Available documentation is located in %{_defaultdocdir}/%{name}. Sample
 scripts and config data are installed in %{_datadir}/%{name}.
 
+%global __requires_exclude_from ^%{_datadir}/%{name}/.*$
 %prep
 %setup -q -n dt.v%{version}
 %patch0 -p1

(From http://www.rpm.org/wiki/PackagerDocs/DependencyGenerator )
Comment 4 Fedora Update System 2015-08-19 06:27:00 EDT
dt-18.32-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dt-18.32-3.fc22
Comment 5 Ondrej Kozina 2015-08-19 06:28:22 EDT
Hi Sitsofe, I applied your patch. Thanks!
Comment 6 Sitsofe Wheeler 2015-08-20 01:40:53 EDT
Hi Ondrej!

After you applied this patch I started revisiting this issue.

First up I got the recommended location of __requires_exclude_from wrong. Apparently it should go "before %description, but after any other definitions" (https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Location_of_macro_invocation ).

Next I took a look at how git coped with this. Over in Bug #492490#c2 they talk about how they ship a lot of contributor scripts but strip off their execute permission so RPM doesn't search those files for dependencies. If only someone had mentioned that this might be another plan on the packaging wiki pages...

Finally I've now come to realise there's a lot more in the Scripts directory than the dt? scripts shipped (butterfly.ksh and DiskTests.ksh look useful) - does it make sense to ship more? If so should they be moved to /usr/share/doc/dt ? Doing a quick
locate /usr/share/\*.*sh | sort
shows some packages (git, socat, bash) shove example scripts in /usr/share/doc whereas other (git-core, vlc) put them in /usr/share/<package>/ .
Comment 7 Fedora Update System 2015-08-21 22:51:53 EDT
dt-18.32-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dt'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/dt-18.32-3.fc22
Comment 8 Sitsofe Wheeler 2016-02-17 08:36:58 EST
Could this be pushed to the main repository - I posted anonymous on bodhi...
Comment 9 Ondrej Kozina 2016-02-29 08:31:25 EST
Hi Sitsofe, so I somehow messed with my notifications setting and didn't receive the message about it being eligible for stable. I'll look into it:( Also I'll revisit the patch for other Fedoras 23+ but will push it in f22 in current version.
Comment 10 Fedora Update System 2016-02-29 17:22:01 EST
dt-18.32-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 11 Sitsofe Wheeler 2016-03-01 00:22:39 EST
Thanks Ondrej!

Note You need to log in before you can comment on or make changes to this bug.