%files directive with relocation in %install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Do the files listed with %files refer to files before %install is run, or after?

I have the following setup in the binary tarball I use with rpmbuild:

/usr/local/bin/foo
/usr/local/lib/libfoo.so
/usr/local/etc/init.d/foo
/usr/local/etc/foo/foo.conf

In the spec file I have:

Prefix: /usr/local

%install

if test -d %{buildroot}%{prefix}/etc
  mkdir -p %{buildroot}/etc
  mv %{buildroot}%{prefix}/etc/* %{buildroot}/etc/
  rm -rf %{buildroot}%{prefix}/etc
fi

%files
%{prefix}/*
%config /etc/foo/foo.conf


Will such a setup work?

On the other hand, can I do this:

%files
/*
%config /etc/foo/foo.conf


Thanks,

Wesley Leggette
Cleversafe, LLC






_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux