From 5563976645a0e0c5c28f3f2ab30a90e0254b61979ffb5670572504a2410d4f01 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 1 Apr 2019 13:56:47 +0000 Subject: [PATCH] Accepting request 689454 from home:mfasheh:branches:filesystems - Use correct path for dracut-fsck-help.txt in module-setup.sh (bsc#1122539) * Remove module-setup.sh * Add module-setup.sh.in OBS-URL: https://build.opensuse.org/request/show/689454 OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=314 --- btrfsprogs.changes | 7 +++++++ btrfsprogs.spec | 13 ++++++++----- module-setup.sh => module-setup.sh.in | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) rename module-setup.sh => module-setup.sh.in (62%) diff --git a/btrfsprogs.changes b/btrfsprogs.changes index 0f08b0e..7afbde7 100644 --- a/btrfsprogs.changes +++ b/btrfsprogs.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 28 20:25:48 UTC 2019 - Mark Fasheh + +- Use correct path for dracut-fsck-help.txt in module-setup.sh (bsc#1122539) + * Remove module-setup.sh + * Add module-setup.sh.in + ------------------------------------------------------------------- Thu Jan 24 04:00:34 UTC 2019 - mfasheh@suse.com diff --git a/btrfsprogs.spec b/btrfsprogs.spec index a0f3bd8..0e9f3fd 100644 --- a/btrfsprogs.spec +++ b/btrfsprogs.spec @@ -44,7 +44,7 @@ URL: https://btrfs.wiki.kernel.org/index.php/Main_Page Source: https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v%{version}.tar.gz # support for mkinitrd in < 13.1 Source1: boot-btrfs.sh -Source2: module-setup.sh +Source2: module-setup.sh.in Source3: dracut-fsck-help.txt Source4: setup-btrfs.sh Source5: sles11-defaults.h @@ -248,8 +248,10 @@ rm -f %{buildroot}/%{_libdir}/*.a install -m 0755 -d %{buildroot}/%{_datadir}/bash-completion/completions install -m 0644 btrfs-completion %{buildroot}/%{_datadir}/bash-completion/completions/btrfs %if 0%{?suse_version} > 1200 -install -m 0755 -D %{SOURCE2} %{buildroot}/%{_dracutmodulesdir}/95suse-btrfs/module-setup.sh -cp %{SOURCE3} . +sed -e 's,@@INSTALLDIR@@,%{_datadir}/%{name}/,;' %{SOURCE2} > module-setup.sh +install -m 0755 -D module-setup.sh %{buildroot}/%{_dracutmodulesdir}/95suse-btrfs/module-setup.sh +rm -f module-setup.sh +install -m 0644 -D %{SOURCE3} %{buildroot}/%{_datadir}/%{name}/dracut-fsck-help.txt %endif %if 0%{!?for_debugging:1} @@ -291,8 +293,9 @@ done %license COPYING %endif %if 0%{?suse_version} > 1200 -%doc dracut-fsck-help.txt -%{_dracutmodulesdir}/95suse-btrfs/ +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/dracut-fsck-help.txt +%dir %{_dracutmodulesdir}/95suse-btrfs/ %{_dracutmodulesdir}/95suse-btrfs/module-setup.sh %endif /sbin/fsck.btrfs diff --git a/module-setup.sh b/module-setup.sh.in similarity index 62% rename from module-setup.sh rename to module-setup.sh.in index cb99f55..886563b 100644 --- a/module-setup.sh +++ b/module-setup.sh.in @@ -12,6 +12,6 @@ depends() { # called by dracut install() { - inst_fsck_help "btrfs" "/usr/share/doc/packages/btrfsprogs/dracut-fsck-help.txt" + inst_fsck_help "btrfs" "@@INSTALLDIR@@/dracut-fsck-help.txt" }