Wiki - https://fedoraproject.org/wiki/Changes/Emacs_Package_Packaging
Discussion Poll -
https://discussion.fedoraproject.org/t/f46-change-proposal-emacs-package-packaging-self-contained/204722/2

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes
process, proposals are publicly announced in order to receive
community feedback. This proposal will only be implemented if approved
by the Fedora Engineering Steering Committee.



== Summary ==

Recent versions of GNU Emacs have a built-in package management system.

* Provide a new RPM macro to install such Emacs packages to the
directories that Emacs expects.

* Provide an RPM dependency generator to extract the Emacs package
metadata, so that Emacs package RPMs automatically depend on each
other when required.

* Modify the packaging guidelines to allow and encourage the use of the above.

== Owner ==
* Name: [[User:mavit| Peter Oliver]]
* Email: <[email protected]>


== Detailed Description ==
The previous guidelines essentially involve having the packager dump
their elisp files into an arbitrary directory, then getting them to
provide their own lisp snippet which will be auto-loaded by Emacs to
teach it where to find the rest of the files.  This works, but isn’t
particularly pretty.

In the time since the previous guidelines were written, Emacs has
gained its own packaging system.  If we drop the package into a
subdirectory of a directory listed in
<code>package-directory-list</code>, Emacs will find it automatically,
complete with the metadata required for it to be visible within Emacs
package interface.  If the package includes Info documentation, Emacs
will find that too (which, under the previous scheme, was something
that packagers could easily neglect to arrange).

Even better, we don’t need to do the installing ourselves: we can ask
the Emacs package installer to do it for us.  This change provides a
new RPM macro, <code>%_emacs_package_install</code> to do that.

As a bonus, Emacs packages include metadata listing, amongst other
things, any other Emacs packages they depend on.  We can extract that,
to automatically generate dependencies between RPMs.  This should make
RPM packaging of Emacs packages easier and more robust.  The virtual
dependencies will be of the format <code>emacs-package(name)</code>.

== Feedback ==
=== Why call the new dependencies <code>emacs-package(foo)</code>
rather than the shorter <code>emacs(foo)</code>? ===

Sadly, <code>emacs()</code> is already taken: for a long time, the
RPMs containing the various Emacs build flavours have all provided
<code>emacs(bin)</code>.  There is currently no Emacs package called
"bin", but we can't be sure that there won't be one in the future.

== Benefit to Fedora ==

The packaging of Emacs packages for Fedora is simplified, and becomes
more uniform.  Installed packages can be introspected from Emacs, and
documentation is more likely to be made available to users.

== Scope ==
* Proposal owners:
** Update <code>emacs-filesystem</code> and <code>emacs-common</code>
RPMs to include <code>site-lisp/elpa/</code> directories.
[https://src.fedoraproject.org/rpms/emacs-filesystem/c/64262f547c72bacbb628c08d64b4ffbadf3c3931?branch=rawhide]
[https://src.fedoraproject.org/rpms/emacs/c/c83cbf42c6dbb08a953a9e7bf9ff442454810263?branch=rawhide]
** Add a new <code>%_emacs_package_install</code> RPM macro the
<code>emacs-common</code> RPM.
[https://src.fedoraproject.org/fork/mavit/rpms/emacs/diff/rawhide..packages]
** Add new dependency generators to the <code>emacs-common</code> RPM.
[https://src.fedoraproject.org/fork/mavit/rpms/emacs/diff/rawhide..packages]
** Update some Emacs package RPMs to exercise the above.
[https://src.fedoraproject.org/rpms/emacs-rpm-spec-mode/commits/rawhide]
[https://src.fedoraproject.org/rpms/emacs-jinx/commits/rawhide]

* Other developers:
** Maintainers of Emacs package RPMs may update them to take advantage
of this change if they choose (but are not required to do so).

* Release engineering: N/A (not needed for this Change)

* Policies and guidelines:
** The [https://docs.fedoraproject.org/en-US/packaging-guidelines/Emacs/
Packaging of add-ons for GNU Emacs] guideline should be updated after
the change.  [https://forge.fedoraproject.org/packaging/guidelines/pulls/1577].

* Trademark approval: N/A (not needed for this Change)

* Alignment with the Fedora Strategy:
** “We integrate programming language stack ecosystems.”


== Upgrade/compatibility impact ==

There should be no negative effect.


== How To Test ==

=== As a RPM package user ===

Until the changes land in rawhide, see
[https://copr.fedorainfracloud.org/coprs/mavit/emacs-package/ Copr].

* Install the updated <code>emacs-rpm-spec-mode</code> RPM, and try
opening a <code>.spec</code> file in Emacs.  You should see syntax
highlighting.

=== As an RPM package maintainer ===

* Try to follow the updated packaging guidelines to convert an RPM
that you maintain to use the new installation method.  When done, the
output of, e.g., <code>rpm -q --provides
emacs-yourpackage-version-release.fc46.noarch.rpm</code> should
include <code>emacs-package(yourpackage) = version</code>.


== User Experience ==

Emacs users will see packages installed via RPM listed when they
<code>M-x list packages</code>.  If they install a package using
Emacs’ built-in package manager, and that package depends on a package
already installed as an RPM, a second copy will not be installed.  If
the package includes documentation in the Info format, they will see
it Emacs' Info browser.

== Dependencies ==

None.

== Contingency Plan ==

* Contingency mechanism: (What to do?  Who will do it?)  Proposal
owners will drop the <code>Requires</code> dependency generator if it
causes unexpected problems.
* Contingency deadline: N/A (not a System Wide Change)
* Blocks release? N/A (not a System Wide Change)

== Documentation ==
N/A (not a System Wide Change)

== Release Notes ==

-- 
Aoife Moloney

Fedora Operations Architect

Fedora Project

Matrix: @amoloney:fedora.im

IRC: amoloney

-- 
_______________________________________________
devel-announce mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new
-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to